上次Ubuntu 18.04更新后损坏的Docker
上次Ubuntu更新后,有人对Docker有问题吗?我在ubuntu18.04中有2个项目由docker-compose运行。两个项目都工作正常,但是在*
.yml Im中进行0更改后,现在开始出现此错误。
internal/fs/utils.js:230 throw err;
^
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
at Object.openSync (fs.js:461:3)
at Object.readFileSync (fs.js:363:35)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:22)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
}
ERROR: Service 'streaming-api' failed to build: The command '/bin/sh -c npm config set unsafe-perm true' returned a non-zero code: 1
我尝试了一些命令来更改Docker中的权限,但没有任何帮助。
回答:
如David 在类似问题中的回答所述,它再次与Docker19版本一起使用。答案来自奥萨马·法莱。
这是我在Ubuntu 18.04上安装Docker版本19的步骤:
sudo apt-get remove docker docker-engine docker.io containerd runcsudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker -v
以上是 上次Ubuntu 18.04更新后损坏的Docker 的全部内容, 来源链接: utcz.com/qa/408415.html