I get "Unable to lock database" when trying to run this. docker
Docker version: Client: Version: 17.12.0-ce API version: 1.35 Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:03:51 2017 OS/Arch: darwin/amd64
Server: Engine: Version: 17.12.0-ce API version: 1.35 (minimum version 1.12) Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:12:29 2017 OS/Arch: linux/amd64 Experimental: true
P.S. Thanks so much for creating this, even if I can't get it to work, it has pointed me in new directions to solve the problem.
I have the same problem. It looks like the problem is not specific to this image, because if I run any "apk" command on the docker-for-mac VM, then I get the same error:
Mac:~$ docker run -it --privileged --pid=host ubuntu:16.04 nsenter -t 1 -m -u -n -i sh
/ # apk update
ERROR: Unable to lock database: Read-only file system
ERROR: Failed to open apk database: Read-only file system
I'm guessing something changed in the way docker for mac interacts with the underlying vm? /cc @justincormack
Are there any updates on this? Running into the same problem.
I have the same problem. Can you provide a solution, please?
The Docker 4 mac VM now boots off a virtual CD-ROM so it is read only. Please don't rely on being able to install packages on the host system to do things; at some point we will probably remove apk from the base system as well. You should be able to use a container.
@justincormack Are you able to expand on how we can use a container to be able to do this? I need to use CRIU on docker for mac, which I think involves installing criu into the same machine that the docker daemon runs on?
You can probably bind mount a copy of the criu binary into the right place ex post, but you are going to have to work out where that is.