Created
December 14, 2017 21:43
-
-
Save mbrock/7ee34cf1372cac938a13062e6a2b79ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt update && apt install -y sudo && \ | |
mkdir -p /home/user && groupadd -r user && \ | |
useradd -r -g user -d /home/user -s /sbin/nologin -c "User" user && \ | |
echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \ | |
chmod 0440 /etc/sudoers.d/user | |
ENV HOME=/home/user | |
RUN chown user:user /home/user | |
RUN apt install -y curl bzip2 | |
USER user | |
ENV USER user | |
WORKDIR /home/user | |
RUN curl https://nixos.org/nix/install | sh | |
RUN echo . /home/user/.nix-profile/etc/profile.d/nix.sh >> .bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment