Generated Dockerfile fails build because of mkdir /code
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 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
Command
generate
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox.schema.json",
"packages": [
"python310@latest",
"jq@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
Devbox version
0.10.1
Nix version
2.21.0
What system does this bug occur on?
Linux (ARM64)
Debug logs
No response
Damn it... I thought I searched this well enough before posting... Thanks for the tag.
@s0rbus With the release of devbox v0.10.4 this issue is resolved.