Switched to non-root user
This commit is contained in:
parent
5cfe2f1a78
commit
e0b1fad0f8
16
Dockerfile
16
Dockerfile
@ -1,5 +1,5 @@
|
|||||||
# Base on latest (edge) alpine image
|
# Base on latest (edge) alpine image
|
||||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
|
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
|
||||||
|
|
||||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||||
|
|
||||||
@ -7,7 +7,11 @@ MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
|||||||
ENV LANG='en_US.UTF-8' \
|
ENV LANG='en_US.UTF-8' \
|
||||||
LANGUAGE='en_US.UTF-8' \
|
LANGUAGE='en_US.UTF-8' \
|
||||||
TERM='xterm' \
|
TERM='xterm' \
|
||||||
VERSION='2.25.0'
|
VERSION='2.25.0' \
|
||||||
|
HYDRA_USER=hydra \
|
||||||
|
HYDRA_UID=1003 \
|
||||||
|
HYDRA_GID=1003
|
||||||
|
|
||||||
|
|
||||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||||
apk update && \
|
apk update && \
|
||||||
@ -18,10 +22,12 @@ RUN wget https://github.com/theotherp/nzbhydra2/releases/download/v$VERSION/nzbh
|
|||||||
mkdir /nzbhydra && \
|
mkdir /nzbhydra && \
|
||||||
unzip /nzbhydra.zip -d /nzbhydra && \
|
unzip /nzbhydra.zip -d /nzbhydra && \
|
||||||
chmod 755 /nzbhydra/nzbhydra2 && \
|
chmod 755 /nzbhydra/nzbhydra2 && \
|
||||||
rm -rf /nzbhydra.zip /tmp/src /var/cache/apk/*
|
rm -rf /nzbhydra.zip /tmp/src /var/cache/apk/* && \
|
||||||
|
addgroup -g $HYDRA_GID $HYDRA_USER && \
|
||||||
|
adduser -D -u $HYDRA_UID -G $HYDRA_USER -H $HYDRA_USER
|
||||||
|
|
||||||
EXPOSE 5076
|
EXPOSE 5076
|
||||||
COPY start.sh /usr/local/bin/start.sh
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
WORKDIR /nzbhydra
|
||||||
|
|
||||||
CMD [ "/usr/local/bin/start.sh" ]
|
CMD [ "/usr/bin/python3", "nzbhydra2wrapperPy3.py", "--nobrowser", "--datafolder=/config/" ]
|
||||||
|
|||||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -28,7 +28,7 @@ spec:
|
|||||||
stage('Build with Kaniko') {
|
stage('Build with Kaniko') {
|
||||||
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-nzbhydra.git', credentialsId: 'jenkins-to-git'
|
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-nzbhydra.git', credentialsId: 'jenkins-to-git'
|
||||||
container('kaniko') {
|
container('kaniko') {
|
||||||
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25.0 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbget2:2'
|
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25.0 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbget2:2 --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v2.25.0 --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v2.25'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user