#37 Improve backup PVC docker image user creation
This commit is contained in:
parent
f75228b05d
commit
6f1b133741
|
|
@ -1,8 +1,16 @@
|
||||||
FROM alpine:3.9
|
FROM alpine:3.9
|
||||||
|
|
||||||
RUN set -x && \
|
ENV USER=user
|
||||||
addgroup -S user -g 1000 && \
|
ENV UID=1000
|
||||||
adduser -S user -G user && \
|
ENV GID=1000
|
||||||
|
|
||||||
|
RUN addgroup --gid "$GID" "$USER" && \
|
||||||
|
adduser \
|
||||||
|
--disabled-password \
|
||||||
|
--gecos "" \
|
||||||
|
--ingroup "$USER" \
|
||||||
|
--uid "$UID" \
|
||||||
|
"$USER" && \
|
||||||
apk add --no-cache bash
|
apk add --no-cache bash
|
||||||
WORKDIR /home/user/bin
|
WORKDIR /home/user/bin
|
||||||
COPY bin .
|
COPY bin .
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
v0.0.2
|
v0.0.3
|
||||||
|
|
|
||||||
|
|
@ -425,7 +425,7 @@ spec:
|
||||||
value: /backup
|
value: /backup
|
||||||
- name: JENKINS_HOME
|
- name: JENKINS_HOME
|
||||||
value: /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
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /jenkins-home # Jenkins home volume
|
- mountPath: /jenkins-home # Jenkins home volume
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ func createJenkinsWithBackupAndRestoreConfigured(t *testing.T, name, namespace s
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: containerName,
|
Name: containerName,
|
||||||
Image: "virtuslab/jenkins-operator-backup-pvc:v0.0.2",
|
Image: "virtuslab/jenkins-operator-backup-pvc:v0.0.3",
|
||||||
ImagePullPolicy: corev1.PullIfNotPresent,
|
ImagePullPolicy: corev1.PullIfNotPresent,
|
||||||
Env: []corev1.EnvVar{
|
Env: []corev1.EnvVar{
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue