criu-for-mac icon indicating copy to clipboard operation
criu-for-mac copied to clipboard

I get "Unable to lock database" when trying to run this. docker

Open joeynovak opened this issue 7 years ago • 8 comments

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

screen shot 2018-01-31 at 2 02 33 pm

joeynovak avatar Jan 31 '18 22:01 joeynovak

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.

joeynovak avatar Jan 31 '18 22:01 joeynovak

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

alexflint avatar Feb 06 '18 19:02 alexflint

I'm guessing something changed in the way docker for mac interacts with the underlying vm? /cc @justincormack

boucher avatar Feb 06 '18 19:02 boucher

Are there any updates on this? Running into the same problem.

ah-cog avatar Jun 06 '18 00:06 ah-cog

I have the same problem. Can you provide a solution, please?

aidagha avatar Aug 01 '18 03:08 aidagha

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 avatar Aug 01 '18 13:08 justincormack

@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?

CRogers avatar Jun 06 '19 11:06 CRogers

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.

justincormack avatar Jun 06 '19 13:06 justincormack