Skip to content

Commit 8e4f0be

Browse files
committed
feature: docker: io: nix
1 parent e53aa06 commit 8e4f0be

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docker/Dockerfile.io

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@ ENV PATH=/usr/local/src/cargo/bin:$PATH
1212

1313
ARG GO_VERSION=1.21.2
1414

15-
RUN apt-get update && apt-get upgrade && apt-get autoremove && \
15+
RUN apt-get update && apt-get upgrade -y && apt-get autoremove && \
1616
apt-get install -y less ffmpeg net-tools netcat-openbsd mc iputils-ping vim neovim bat fzf \
1717
locales sudo command-not-found && \
1818
echo "> Update command-not-found database. Run 'sudo apt update' to populate it." && \
1919
apt-get update && \
2020
apt-get autoremove && apt-get clean && \
2121
rm -rf /var/lib/apt/lists/* && \
22+
echo "> install nix" && \
23+
useradd -m -s /bin/bash nixuser && \
24+
echo "nixuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/nixuser && \
25+
chmod 0440 /etc/sudoers.d/nixuser && \
26+
su - nixuser -c "curl -L https://nixos.org/nix/install | sh -s -- --no-daemon" && \
27+
mv /home/nixuser/.nix-profile /usr/local/src/nix-profile && \
28+
mv /home/nixuser/.nix-defexpr /usr/local/src/nix-defexpr && \
29+
rm -rf /etc/sudoers.d/nixuser && \
30+
userdel -r nixuser && \
2231
echo "> install nvm" && \
2332
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash && \
2433
mv ~/.nvm /usr/local/src/nvm && \
@@ -79,6 +88,8 @@ ENV cloudcmd_terminal_path=gritty
7988
ENV cloudcmd_open=false
8089
8190
ENV PATH=node_modules/.bin:$PATH
91+
ENV PATH=/usr/local/src/nix/profile/bin:$PATH
92+
ENV NIX_PATH=/usr/local/src/nix/defexpr/channels
8293
8394
ENV BUN_INSTALL_CACHE_DIR=/tmp/bun-cache
8495
ENV DENO_DIR=/tmp/deno-cache

0 commit comments

Comments
 (0)