#37 Improve backup PVC docker image user creation

This commit is contained in:
Tomasz Sęk 2019-06-26 22:50:36 +02:00
parent f75228b05d
commit 6f1b133741
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
4 changed files with 14 additions and 6 deletions

View File

@ -1,8 +1,16 @@
FROM alpine:3.9
RUN set -x && \
addgroup -S user -g 1000 && \
adduser -S user -G user && \
ENV USER=user
ENV UID=1000
ENV GID=1000
RUN addgroup --gid "$GID" "$USER" && \
adduser \
--disabled-password \
--gecos "" \
--ingroup "$USER" \
--uid "$UID" \
"$USER" && \
apk add --no-cache bash
WORKDIR /home/user/bin
COPY bin .

View File

@ -1 +1 @@
v0.0.2
v0.0.3

View File

@ -425,7 +425,7 @@ spec:
value: /backup
- name: JENKINS_HOME
value: /jenkins-home
image: virtuslab/jenkins-operator-backup-pvc:v0.0.2 # look at backup/pvc directory
image: virtuslab/jenkins-operator-backup-pvc:v0.0.3 # look at backup/pvc directory
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /jenkins-home # Jenkins home volume

View File

@ -100,7 +100,7 @@ func createJenkinsWithBackupAndRestoreConfigured(t *testing.T, name, namespace s
},
{
Name: containerName,
Image: "virtuslab/jenkins-operator-backup-pvc:v0.0.2",
Image: "virtuslab/jenkins-operator-backup-pvc:v0.0.3",
ImagePullPolicy: corev1.PullIfNotPresent,
Env: []corev1.EnvVar{
{