Skip to content

Commit 75d57ba

Browse files
Lagojamohsenari
andauthored
Update Dockerfile to match Devbox Cloud (#973)
## Summary TSIA -- moves our generated dockerfile to a `debain:stable-slim` base ## How was it tested? `docker build .` on an example project --------- Co-authored-by: mohsenari <[email protected]>
1 parent d000bc6 commit 75d57ba

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
FROM alpine:3
1+
FROM debian:stable-slim
22

3-
# Setting up devbox user
4-
ENV DEVBOX_USER=devbox
5-
RUN adduser -h /home/$DEVBOX_USER -D -s /bin/bash $DEVBOX_USER
6-
RUN addgroup sudo
7-
RUN addgroup $DEVBOX_USER sudo
8-
RUN echo " $DEVBOX_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
3+
# Step 1: Installing dependencies
4+
RUN apt-get update
5+
RUN apt-get -y install bash binutils git xz-utils wget sudo
96

10-
# installing dependencies
11-
RUN apk add --no-cache bash binutils git libstdc++ xz sudo
7+
# Step 2: Setting up devbox user
8+
ENV DEVBOX_USER=devbox
9+
RUN adduser $DEVBOX_USER
10+
RUN usermod -aG sudo $DEVBOX_USER
11+
RUN echo "devbox ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$DEVBOX_USER
1212

1313
USER $DEVBOX_USER
1414

15-
# installing devbox
16-
RUN wget --quiet --output-document=/dev/stdout https://get.jetpack.io/devbox | bash -s -- -f
15+
# Step 3: Installing devbox
16+
RUN wget --quiet --output-document=/dev/stdout https://get.jetpack.io/devbox | bash -s -- -f
1717
RUN chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /usr/local/bin/devbox
1818

19-
# nix installer script
20-
RUN wget --quiet --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon
19+
# Step 4: Installing Nix
20+
RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon
2121
RUN . ~/.nix-profile/etc/profile.d/nix.sh
2222
# updating PATH
2323
ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:/home/${DEVBOX_USER}/.devbox/nix/profile/default/bin:${PATH}"
2424

25+
# Step 5: Installing your devbox project
2526
WORKDIR /code
2627
RUN sudo chown $DEVBOX_USER:root /code
2728
COPY devbox.json devbox.json
28-
RUN devbox run -- echo "Installing packages"
29+
RUN devbox install
2930
CMD ["devbox", "shell"]
30-

0 commit comments

Comments
 (0)