Skip to content

Commit 4928aea

Browse files
authored
[generate] Fixed permission issue for generated dockerfile (#657)
## Summary - Fixed permission issue with generated dockerfile for `devebox generate devcontainer` and `devbox generate dockerfile` addressing issue #627 - Fixed issue with entrypoint command for generated dockerfile. The old format was causing the built image to have `devbox /bin/sh -c ["shell"]` as entrypoint instead of the intended `devbox shell`. So running `docker run image_name` would result in `Error: unknown command "/bin/sh" for "devbox"` ## How was it tested? compile run `devbox generate dockerfile` run `docker built devboximage .` run `docker run -it devboximage` confirm docker image is built successfully confirm docker image runs successfully
1 parent 8669472 commit 4928aea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/impl/tmpl/devcontainerDockerfile.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ RUN . ~/.nix-profile/etc/profile.d/nix.sh
2323
ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:/home/${DEVBOX_USER}/.devbox/nix/profile/default/bin:${PATH}"
2424

2525
WORKDIR /code
26+
RUN sudo chown $DEVBOX_USER:root /code
2627
COPY devbox.json devbox.json
2728
RUN devbox shell -- echo "Installing packages"
28-
ENTRYPOINT ["devbox"]
29-
CMD ['shell']
29+
CMD ["devbox", "shell"]
3030

0 commit comments

Comments
 (0)