feature: docker: io: nix

This commit is contained in:
coderiaser 2026-04-01 14:33:41 +03:00
parent e53aa06cdb
commit de95086734

View file

@ -9,16 +9,26 @@ COPY package.json /usr/src/cloudcmd/
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH=/usr/local/src/cargo/bin:$PATH
ENV NIX_INSTALLER_EXTRA_CONF="filter-syscalls = false"
ARG GO_VERSION=1.21.2
RUN apt-get update && apt-get upgrade && apt-get autoremove && \
RUN apt-get update && apt-get upgrade -y && apt-get autoremove && \
apt-get install -y less ffmpeg net-tools netcat-openbsd mc iputils-ping vim neovim bat fzf \
locales sudo command-not-found && \
echo "> Update command-not-found database. Run 'sudo apt update' to populate it." && \
apt-get update && \
apt-get autoremove && apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
echo "> install nix" && \
useradd -m -s /bin/bash nixuser && \
echo "nixuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/nixuser && \
chmod 0440 /etc/sudoers.d/nixuser && \
su - nixuser -c "curl -L https://nixos.org/nix/install | sh -s -- --no-daemon" && \
mv /home/nixuser/.nix-profile /usr/local/src/nix-profile && \
mv /home/nixuser/.nix-defexpr /usr/local/src/nix-defexpr && \
rm -rf /etc/sudoers.d/nixuser && \
userdel -r nixuser && \
echo "> install nvm" && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash && \
mv ~/.nvm /usr/local/src/nvm && \
@ -79,6 +89,8 @@ ENV cloudcmd_terminal_path=gritty
ENV cloudcmd_open=false
ENV PATH=node_modules/.bin:$PATH
ENV PATH=/usr/local/src/nix/profile/bin:$PATH
ENV NIX_PATH=/usr/local/src/nix/defexpr/channels
ENV BUN_INSTALL_CACHE_DIR=/tmp/bun-cache
ENV DENO_DIR=/tmp/deno-cache