Based On Closed Issue At: #1601
Hi getting same error, Using Docker for Windows and not Docker Toolbox. Tried chmod -r 0777 /var/opt/gitlab
, chmod 2770 /var/opt/gitlab
, chmod +x /var/opt/gitlab
nothing helped. Running image using docker run --detach --hostname sachingupta.io -P --name gitlab_ce_server --volume /d/gitlab_ce/config:/etc/gitlab --volume /d/gitlab_ce/logs:/var/log/gitlab --volume /d/gitlab_ce/data:/var/opt/gitlab gitlab/gitlab-ce:latest
. Even on Windows (x64) set full permissions to Everybody on /d/gitlab_ce/ folder. Any clues - this is also happening with gitlab-ee.
Whole log follows:
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=9.0.4-ce.0
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab vim /etc/gitlab/gitlab.rb
docker restart gitlab
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
Preparing services...
Starting services...
Configuring GitLab package...
Configuring GitLab...
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- runit (0.14.2)
- gitlab (0.0.1)
- package (0.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create
- change mode from '0755' to '0775'
Converging 364 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create (up to date)
* directory[/opt/gitlab/embedded/etc] action create
- create new directory /opt/gitlab/embedded/etc
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
* template[/opt/gitlab/embedded/etc/gitconfig] action create
- create new file /opt/gitlab/embedded/etc/gitconfig
- update content in file /opt/gitlab/embedded/etc/gitconfig from none to 5fe039
--- /opt/gitlab/embedded/etc/gitconfig 2017-04-26 14:07:22.013611900 +0000
+++ /opt/gitlab/embedded/etc/.chef-gitconfig20170426-26-1tufm2i 2017-04-26 14:07:22.013611900 +0000
@@ -1 +1,10 @@
+[pack]
+ threads = 1
+[receive]
+ fsckObjects = true
+[repack]
+ writeBitmaps = true
+[transfer]
+ hideRefs=^refs/tmp/
+hideRefs=^refs/keep-around/
- change mode from '' to '0755'
Recipe: gitlab::users
* directory[/var/opt/gitlab] action create (up to date)
* template[/var/opt/gitlab/.gitconfig] action create
- update content in file /var/opt/gitlab/.gitconfig from c8a5eb to ae16f8
--- /var/opt/gitlab/.gitconfig 2017-04-26 14:05:55.915057900 +0000
+++ /var/opt/gitlab/.chef-.gitconfig20170426-26-1b71kuc 2017-04-26 14:07:22.040511400 +0000
@@ -4,7 +4,7 @@
[user]
name = GitLab
- email = gitlab@b704465b9323
+ email = gitlab@649f4af7a2da
[core]
autocrlf = input
[gc]
- change mode from '0755' to '0644'
- change owner from 'root' to 'git'
- change group from 'root' to 'git'
Recipe: gitlab::gitlab-shell
* ruby_block[directory resource: /var/opt/gitlab/git-data] action run
================================================================================
Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/git-data]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Failed asserting that ownership of "/var/opt/gitlab/git-data" was git
---- Begin output of set -x && [ "$(stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data))" = 'git' ] ----
STDOUT:
STDERR: + readlink -f /var/opt/gitlab/git-data
+ stat --printf=%U /var/opt/gitlab/git-data
+ [ root = git ]
---- End output of set -x && [ "$(stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data))" = 'git' ] ----
Ran set -x && [ "$(stat --printf='%U' $(readlink -f /var/opt/gitlab/git-data))" = 'git' ] returned 1
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:124:in `validate_command'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:112:in `block in validate'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:111:in `each_index'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:111:in `validate'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:87:in `validate!'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:35:in `block (3 levels) in from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb
26: ruby_block "directory resource: #{params[:path]}" do
27: block do
28: # Ensure the directory exists
29: storage_helper.ensure_directory_exists(params[:path])
30:
31: # Ensure the permissions are set
32: storage_helper.ensure_permissions_set(params[:path])
33:
34: # Error out if we have not achieved the target permissions
35: storage_helper.validate!(params[:path])
36: end
37: not_if { storage_helper.validate(params[:path]) }
38: end
39: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:26:in `block in from_file'
ruby_block("directory resource: /var/opt/gitlab/git-data") do
params {:path=>"/var/opt/gitlab/git-data", :owner=>"git", :group=>nil, :mode=>"0700", :name=>"/var/opt/gitlab/git-data"}
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
block_name "directory resource: /var/opt/gitlab/git-data"
declared_type :ruby_block
cookbook_name "gitlab"
recipe_name "gitlab-shell"
block #<Proc:0x0000000436f3b8@/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:27>
not_if { #code block }
end
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 4 resources updated in 03 seconds