问题
does anyone have problem with Docker after last Ubuntu update? Ive got 2 projects which I run by docker-compose in ubuntu18.04. Both projects worked fine, but after 0 changes in *.yml Im starting to get this error now.
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
I tried some commands to change permissions in Docker but nothing helps.
回答1:
It works again with Docker version 19 as stated in answer in similar question of David. The answer is from oussama faleh.
Here my steps to install docker version 19 on Ubuntu 18.04:
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo 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
来源:https://stackoverflow.com/questions/61990562/broken-docker-after-last-ubuntu-18-04-update