Docker重啟GitLab異常/opt/gitlab/embedded/bin/runsvdir-start: No such file or directory(特殊情況)
阿新 • • 發佈:2019-08-29
一、 基本情況
原來在學習gitlab安裝的時候,學習了centos本地安裝和docker安裝,當時本地安裝完成後直接關閉了gitlab服務,然後直接嘗試Docker安裝,Docker成功,然後想把本地安裝的GitLab給解除安裝了。
# 停止gitlab sudo gitlab-ctl stop #解除安裝gitlab sudo rpm -e gitlab-ce #檢視gitlab程序 ps -ef|grep gitlab #殺掉第一個守護程序(runsvdir -P /opt/gitlab/service log) kill -9 4473 #刪除所有包含gitlab的檔案及目錄 find / -name *gitlab*|xargs rm -rf
執行到最後一步的時候,後悔了,因為是模糊匹配,會把GitLab的Docker配置和映象也刪掉,趕緊終止,重啟docker的gitlab容器,果然報錯
Thank you for using GitLab Docker Image! Current version: gitlab-ce=11.7.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... /assets/wrapper: line 81: /opt/gitlab/embedded/bin/runsvdir-start: No such file or directory /assets/wrapper: line 84: gitlab-ctl: command not found
解決方法,重新下載docker映象,前提是你掛載的本地