Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/git-data]'

When I execute gitlab-ce from docker hub using gitlab-ce:latest always gets following error.

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:
  - gitlab (0.0.1)
  - runit (0.14.2)
  - 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-19 11:34:42.174972100 +0000
    +++ /opt/gitlab/embedded/etc/.chef-gitconfig20170419-28-1bbwclb	2017-04-19 11:34:42.174972100 +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 534ec3 to 4eca9d
    --- /var/opt/gitlab/.gitconfig	2017-04-19 11:34:23.184661700 +0000
    +++ /var/opt/gitlab/.chef-.gitconfig20170419-28-o7ufgw	2017-04-19 11:34:42.196734500 +0000
    @@ -4,7 +4,7 @@
     
     [user]
             name = GitLab
    -        email = gitlab@30bc37074298
    +        email = gitlab@9419bd29bc4d
     [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:0x00000005b5c340@/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