Adding non-root user
This commit is contained in:
parent
41d80d59b7
commit
9b5315ab4f
16
Dockerfile
16
Dockerfile
@ -1,12 +1,15 @@
|
||||
# Base on latest (edge) alpine image
|
||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12
|
||||
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
|
||||
|
||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||
LABEL maintainer="Jonathan Ervine <docker@ervine.org>"
|
||||
|
||||
# Install updates
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LANGUAGE='en_US.UTF-8' \
|
||||
TERM='xterm'
|
||||
TERM='xterm' \
|
||||
TORRENT_USER='torrent' \
|
||||
TORRENT_UID='1003' \
|
||||
TORRENT_GID='1003'
|
||||
|
||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||
apk update && \
|
||||
@ -19,15 +22,12 @@ RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositorie
|
||||
rmdir combustion-release && \
|
||||
rm release.zip
|
||||
|
||||
COPY start.sh /usr/loca/bin/start.sh
|
||||
|
||||
#ADD UTC /etc/localtime
|
||||
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 9091
|
||||
|
||||
VOLUME /config
|
||||
|
||||
USER $TORRENT_USER
|
||||
|
||||
CMD [ "/usr/local/bin/start.sh" ]
|
||||
CMD [ "/usr/bin/transmission-daemon", "-f", "-g", "/config/" ]
|
||||
|
||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -27,7 +27,7 @@ spec:
|
||||
stage('Build with Kaniko') {
|
||||
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-transmission.git', credentialsId: 'jenkins-to-git'
|
||||
container('kaniko') {
|
||||
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:latest --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:3.12.0 --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:3.12'
|
||||
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:3.12.0 --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:v3.12 --destination=harbor.ervine.dev/library/x86_64/alpine/transmission:v3.12.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user