add modified nix image for use with jenkins
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
8ca6a70258
commit
534f84419c
|
@ -0,0 +1,20 @@
|
|||
ARG NIX_VERSION
|
||||
FROM nixos/nix:${NIX_VERSION}
|
||||
|
||||
ARG JENKINS_UID
|
||||
ARG JENKINS_GID
|
||||
|
||||
RUN addgroup -g ${JENKINS_GID} jenkins \
|
||||
&& adduser -D -u ${JENKINS_UID} -G jenkins jenkins \
|
||||
-s /nix/var/nix/profiles/default/bin/nix-shell \
|
||||
&& chown jenkins:jenkins -R /nix
|
||||
|
||||
ADD nix.conf /home/jenkins/.config/nix/nix.conf
|
||||
ADD default.nix home/jenkins/default.nix
|
||||
|
||||
WORKDIR /home/jenkins
|
||||
|
||||
USER jenkins
|
||||
|
||||
MAINTAINER Jakub Sokolowski "jakub@status.im"
|
||||
LABEL description="Adjusted Nix Docker image for use with Jenkins"
|
|
@ -0,0 +1,16 @@
|
|||
NIX_VERSION = 2.2.1
|
||||
JENKINS_UID = 1001
|
||||
JENKINS_GID = 1001
|
||||
|
||||
IMAGE_TAG = jenkins
|
||||
IMAGE_NAME = statusteam/nix:$(IMAGE_TAG)
|
||||
|
||||
build:
|
||||
docker build --squash=true \
|
||||
--build-arg="JENKINS_UID=$(JENKINS_UID)" \
|
||||
--build-arg="JENKINS_GID=$(JENKINS_GID)" \
|
||||
--build-arg="NIX_VERSION=$(NIX_VERSION)" \
|
||||
-t $(IMAGE_NAME) .
|
||||
|
||||
push: build
|
||||
docker push $(IMAGE_NAME)
|
|
@ -0,0 +1,9 @@
|
|||
with import <nixpkgs> { };
|
||||
stdenv.mkDerivation rec {
|
||||
name = "env";
|
||||
env = buildEnv { name = name; paths = buildInputs; };
|
||||
buildInputs = with pkgs; [
|
||||
bash
|
||||
wget
|
||||
];
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
extra-substituters = https://nix-cache.status.im
|
||||
trusted-public-keys = nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
Loading…
Reference in New Issue