grammarly/rocker

Support for docker mac beta?

Closed this issue · 3 comments

Hi team,

I tried using rocker with the docker-for-mac beta, and saw a few different (blocking) errors.

ADD package.json /tmp
WORKDIR /tmp
RUN npm install

produces:

INFO[0000] WORKDIR /tmp
INFO[0000] Commit changes
INFO[0000] | Cached! Take image sha256:35894    size=154.5 MB (+0 B)
INFO[0000] RUN npm install
INFO[0000] | Not cached
INFO[0000] | Created container 20a471e8d874 (image sha256:35894)
INFO[0000] | Removing container 20a471e8d874
FATA[0000] API error (500): rpc error: code = 2 desc = "oci runtime error: not a directory"
ADD package.json /tmp
WORKDIR /tmp
MOUNT /tmp/node_modules
RUN npm install

produces:

INFO[0000] WORKDIR /tmp
INFO[0000] MOUNT /tmp/node_modules
INFO[0000] | Using container rocker_mount_bbb8a7f5ffaf for /tmp/node_modules
INFO[0000] Commit changes
INFO[0000] | Cached! Take image sha256:321d7    size=154.5 MB (+0 B)
INFO[0000] RUN npm install
INFO[0000] | Not cached
INFO[0000] | Created container 1d3a04c4881f (image sha256:321d7)
INFO[0000] | Removing container 1d3a04c4881f
FATA[0000] API error (500): rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: lstat /var/lib/docker/aufs/mnt/10411ac3d494fc84bd79796589dcb5c3b8270c1922d99a2494041499bf38da47/tmp/node_modules: not a directory"

Perhaps this isn't a problem with the mac beta.

I get a similar result, when running it with the latest docker toolbox for mac:

INFO[0027] RUN npm install
INFO[0027] | Created container 32e6b8b28124 (image sha256:6e453)
INFO[0027] | Removing container 32e6b8b28124
FATA[0027] API error (500): rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: lstat /mnt/sda1/var/lib/docker/aufs/mnt/c662c9ec27df837f5aab8b8716975028de409499519160c86200cef690172a86/tmp/node_modules: not a directory"

Indeed, nothing to do with the version of docker used!

This was caused by my typo:

ADD package.json /tmp

which should have been:

ADD package.json /tmp/package.json

This issue is just a matter of validation/error messaging.

Thanks, @igrayson. I can't see how we can improve error messaging in this particular case from Rocker side.