I ran devbox generate and tried to use the generated files in vscode to create a devcontainer. Build fails because the generated Dockerfile first runs WORKDIR /code then later attempts RUN mkdir /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code. The WORKDIR command creates /code so then mkdir /code fails.
I also tried this out by attempting to manually create a docker image using the generated Dockerfile - this fails for same reason.
I suggest the mkdir /code is removed OR WORKDIR /code is moved to later in the Dockerfile. When I removed mkdir /code then everything works as expected.
Steps to reproduce
devbox generate devcontainer
open folder in vscode which should build an image and run container
What happened?
I ran devbox generate and tried to use the generated files in vscode to create a devcontainer. Build fails because the generated Dockerfile first runs
WORKDIR /code
then later attemptsRUN mkdir /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
. The WORKDIR command creates /code so then mkdir /code fails.I also tried this out by attempting to manually create a docker image using the generated Dockerfile - this fails for same reason.
I suggest the
mkdir /code
is removed ORWORKDIR /code
is moved to later in the Dockerfile. When I removedmkdir /code
then everything works as expected.Steps to reproduce
Command
generate
devbox.json
Devbox version
0.10.1
Nix version
2.21.0
What system does this bug occur on?
Linux (ARM64)
Debug logs
No response