alpine-make-vm-image
alpine-make-vm-image copied to clipboard
Fails in Docker for Mac 2.4?
The script I'd been happily using was broken by the Docker for Mac 2.4.0.0 update that was pushed out today. The symptom was:
mkfs.ext4: I/O error while writing out and closing file system
Downgrading to Docker 2.3.0.5 worked around the problem.
I tried to come up with a minimal reproducer to submit to the Docker guys, but so far failed. This is where I left it:
# Run with 'docker build -t nbdbug . && docker run --privileged -t nbdbug'
FROM alpine:3.12
RUN apk update && apk add qemu-img e2fsprogs
CMD \
find /dev -maxdepth 2 -name 'nbd[0-9]*' && \
qemu-img create -f qcow2 dummy.img 500M && \
qemu-nbd --connect=/dev/nbd1 --cache=writeback --format=qcow2 dummy.img && \
mkfs.ext4 -L root -O ^64bit -E nodiscard /dev/nbd1 && \
qemu-nbd --disconnect /dev/nbd1
but that also succeeds on the new docker. /me is perplexed.
This also affected a coworker who was using docker's Edge version, so he saw it before I did.
I don’t understand what do you think that I’m supposed to do about it. alpine-make-vm-image doesn’t use Docker and it’s not supposed to be used in this way. Why do you even run it inside Docker?
Alas, you cannot escape Docker these days. Any tool you write will be used in a script that some poor slob has to run in Docker sometime. There is a whole world of developers who wouldn't dream of running anything *not" in Docker, I kid you not.
I filed the report for the benefit of anyone else in the same boat. I do think it's really a bug in Docker for Mac, which comes with its own VM and copy of Linux to act as a host; their kernel probably dropped an important configuration flag in the update.
Under the older Docker, your script works a treat. Thanks!