mirror of
https://github.com/status-im/infra-utils.git
synced 2025-02-24 01:48:14 +00:00
use alpine
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
451271bb18
commit
de88db49ed
@ -1,20 +1,33 @@
|
|||||||
ARG NIX_VERSION
|
FROM alpine:3.9
|
||||||
FROM nixos/nix:${NIX_VERSION}
|
|
||||||
|
|
||||||
|
ARG NIX_VERSION
|
||||||
ARG JENKINS_UID
|
ARG JENKINS_UID
|
||||||
ARG JENKINS_GID
|
ARG JENKINS_GID
|
||||||
|
|
||||||
RUN addgroup -g ${JENKINS_GID} jenkins \
|
COPY --from=nixos/nix /nix /nix
|
||||||
&& adduser -D -u ${JENKINS_UID} -G jenkins jenkins \
|
ADD nix.sh /etc/profile.d/nix.sh
|
||||||
-s /nix/var/nix/profiles/default/bin/nix-shell \
|
|
||||||
&& chown jenkins:jenkins -R /nix
|
|
||||||
|
|
||||||
ADD nix.conf /home/jenkins/.config/nix/nix.conf
|
RUN chown ${JENKINS_UID}:${JENKINS_GID} -R /nix
|
||||||
ADD default.nix home/jenkins/default.nix
|
|
||||||
|
RUN addgroup -g ${JENKINS_GID} jenkins
|
||||||
|
RUN adduser -D -g jenkins -u ${JENKINS_UID} -G jenkins jenkins
|
||||||
|
|
||||||
WORKDIR /home/jenkins
|
WORKDIR /home/jenkins
|
||||||
|
|
||||||
USER jenkins
|
USER jenkins
|
||||||
|
|
||||||
|
ADD nix.conf /home/jenkins/.config/nix/nix.conf
|
||||||
|
ADD default.nix /home/jenkins/default.nix
|
||||||
|
|
||||||
|
RUN ln -s /nix/var/nix/profiles/default ~/.nix-profile
|
||||||
|
RUN echo $HOME
|
||||||
|
RUN echo $USER
|
||||||
|
RUN echo $PATH
|
||||||
|
RUN echo $SHELL
|
||||||
|
RUN nix-channel --add https://nixos.org/channels/nixos-19.03-small
|
||||||
|
RUN nix-channel --update
|
||||||
|
RUN nix-shell --run 'echo'
|
||||||
|
|
||||||
|
RUN echo 'exec /nix/var/nix/profiles/default/bin/nix-shell' > /etc/profile.d/nix-shell.sh
|
||||||
|
|
||||||
MAINTAINER Jakub Sokolowski "jakub@status.im"
|
MAINTAINER Jakub Sokolowski "jakub@status.im"
|
||||||
LABEL description="Adjusted Nix Docker image for use with Jenkins"
|
LABEL description="Adjusted Nix Docker image for use with Jenkins"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user