OS:Ubuntu 18.04.2
Docker:18.09.2
Image: gitlab/gitlab-ce:latest
启动命令
sudo docker run -d \ --hostname 192.168.1.1 \ --publish 8443:443 --publish 8081:80 --publish 8022:22 \ --name gitlab \ --privileged=true \ --volume /Gitlab/config:/etc/gitlab \ --volume /Gitlab/logs:/var/log/gitlab \ --volume /Gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
但是容器启动后状态一直是 Up 1 seconds (health: starting) 启动中
约30~40秒后退出
查看日志 current
2019-04-09_03:38:46.47958 @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ 2019-04-09_03:38:46.47971 Permissions 0777 for '/etc/gitlab/ssh_host_ed25519_key' are too open. 2019-04-09_03:38:46.47978 It is required that your private key files are NOT accessible by others. 2019-04-09_03:38:46.47983 This private key will be ignored. 2019-04-09_03:38:46.47987 key_load_private: bad permissions 2019-04-09_03:38:46.47992 Could not load host key: /etc/gitlab/ssh_host_ed25519_key 2019-04-09_03:38:46.48018 Server listening on 0.0.0.0 port 22. 2019-04-09_03:38:46.48230 Server listening on :: port 22.
[2019-04-09T03:39:21+00:00] INFO: Running queued delayed notifications before re-raising exception [2019-04-09T03:39:21+00:00] INFO: Running queued delayed notifications before re-raising exception [2019-04-09T03:39:21+00:00] ERROR: Running exception handlers [2019-04-09T03:39:21+00:00] ERROR: Exception handlers complete [2019-04-09T03:39:21+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out [2019-04-09T03:39:21+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2019-04-09T03:39:21+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: storage_directory[/var/opt/gitlab/.ssh] (gitlab::gitlab-shell line 38) had an error: Mixlib::ShellOut::ShellCommandF ailed: ruby_block[directory resource: /var/opt/gitlab/.ssh] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::S hellCommandFailed: Failed asserting that ownership of "/var/opt/gitlab/.ssh" was git:git ---- Begin output of set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/.ssh))" = 'git:git' ] ---- STDOUT: STDERR: + readlink -f /var/opt/gitlab/.ssh + stat --printf=%U:%G /var/opt/gitlab/.ssh + [ root:root = git:git ] ---- End output of set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/.ssh))" = 'git:git' ] ---- Ran set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/.ssh))" = 'git:git' ] returned 1
请问这个问题怎么解决?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
参考 ssh “permissions are too open” error: