- 添加 --restart=always參數(shù)后容器狀態(tài)一直處于Restarting
解決:添加 -i參數(shù)摸屠,如:docker run -i --restart=always.... - Error response from daemon: driver failed programming external connectivity on endpoint lnmp (ac1a9c20be8f96388c1fc2d78983297d1d9b9feb428d8ca31cc3ff46c81d5d91): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied
解決:
1) 檢查映射的端口是否被宿主機(jī)占用
2) 檢查docker網(wǎng)卡是否被禁用 - Error response from daemon: Conflict. The container name "/lnmp2" is already in use by container 458cc86f66bd562227e4e265aefbbf57ef9893c0d147b325bf1875f504080e7c. You have to remove (or rename) that container to be able to reuse that name..
解決:docker run 時(shí)使用的容器名稱已存在艾猜,使用另外的容器名稱抽兆,或修改原來容器 - docker: Error response from daemon: D: drive is not shared. Please share it in Docker for Windows Settings. See 'docker run --help'.
解決:這通常是windows下的錯(cuò)誤钦讳,右鍵點(diǎn)擊右下角docker圖標(biāo) -> Settings... -> Shared Drives -> 勾選要掛載的磁盤盤符 -> apply念颈,然后 docker run .... - docker tools中使用數(shù)據(jù)卷無法將數(shù)據(jù)映射到docker容器中
解決:
I. 打開virtualbox谤草,選中default虛擬機(jī)犹褒,選擇設(shè)置 -> 共享文件夾 -> 添加共享文件夾梢为,將掛載的數(shù)據(jù)卷映射到虛擬機(jī)中一樣的目錄
II. 設(shè)置環(huán)境虛擬機(jī)環(huán)境變量
docker-machine env # 運(yùn)行命令后渐行,log中顯示如下語句轰坊,拷貝執(zhí)行
eval $("D:\Program Files\Docker Toolbox\docker-machine.exe" env)
III. 重啟虛擬機(jī)
- Error response from daemon: --live-restore daemon configuration is incompatible with swarm mode
解決:
I. 編輯 daemon.json 文件,將"live-restore"設(shè)置為false
> vim /etc/docker/daemon.json
{
"live-restore": false
}
II. 重啟 docker
> systemctl restart docker