devbox icon indicating copy to clipboard operation
devbox copied to clipboard

[Docs] Add installation option for inside Docker/Containers

Open rrmistry opened this issue 1 year ago • 0 comments

What problem are you trying to solve?

Attempting to install devbox inside docker using the provided Linux script doesn't work because of the prompt messages that get asked.

E.g.

curl -fsSL https://get.jetify.com/devbox | bash
...
? Install devbox to /usr/local/bin (requires sudo)? [Y/n]
...
Nix is not installed. Devbox will attempt to install it.

Press enter to continue or ctrl-c to exit.
...

From Discord, I found this script:

# Step 2: Installing Nix
RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon
RUN . ~/.nix-profile/etc/profile.d/nix.sh

ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:$PATH"

# Step 3: Installing devbox
ENV DEVBOX_USE_VERSION=$DEVBOX_USE_VERSION
RUN wget --quiet --output-document=/dev/stdout https://get.jetify.com/devbox   | bash -s -- -f
RUN chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /usr/local/bin/devbox

But this was not easy to find.

What solution would you like?

Documenting this front-and-centre in the official docs would be good.

rrmistry avatar Oct 20 '24 04:10 rrmistry