new file: Dockerfile
new file: Jenkinsfile Initial commit
This commit is contained in:
parent
16d025083a
commit
311f2ff3bd
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@ -0,0 +1,40 @@
|
||||
# Base on latest (edge) alpine image
|
||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
|
||||
|
||||
LABEL maintainer “Jonathan Ervine” <docker@ervine.org> architecture="x86_64" date="17022020"
|
||||
|
||||
# Install updates
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LANGUAGE='en_US.UTF-8' \
|
||||
TERM='xterm' \
|
||||
VERSION='master' \
|
||||
CP_USER='mediaservice' \
|
||||
CP_GROUP='mediaservice' \
|
||||
CP_UID='1003' \
|
||||
CP_GID='1003'
|
||||
|
||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk -U upgrade && \
|
||||
apk -U add \
|
||||
python \
|
||||
py-lxml \
|
||||
py-simplejson \
|
||||
py-openssl
|
||||
|
||||
RUN wget https://github.com/CouchPotato/CouchPotatoServer/archive/$VERSION.tar.gz -O couchpotato.tar.gz && \
|
||||
tar zxvf couchpotato.tar.gz && \
|
||||
mv CouchPotatoServer-$VERSION couchpotato && \
|
||||
rm -rf couchpotato.tar.gz && \
|
||||
apk del make gcc g++ && \
|
||||
rm -rf /tmp/src && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
addgroup -g $CP_GID $CP_GROUP && \
|
||||
adduser -D -u $CP_UID -G $CP_GROUP -H $CP_USER && \
|
||||
chown -R $CP_USER:$CP_GROUP /couchpotato
|
||||
|
||||
EXPOSE 5050
|
||||
|
||||
USER $CP_USER
|
||||
|
||||
CMD [ "/usr/bin/python", "/couchpotato/CouchPotato.py", "--console_log", "--data_dir=/config" ]
|
||||
17
Jenkinsfile
vendored
Normal file
17
Jenkinsfile
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
node("docker-node") {
|
||||
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
|
||||
|
||||
git branch: "3.11.3", url: "ssh://git@git.ervine.org:2222/jonny/x86_64-alpine-cp", credentialsId: 'jenkins-to-git'
|
||||
|
||||
sh "git rev-parse HEAD > .git/commit-id"
|
||||
def commit_id = readFile('.git/commit-id').trim()
|
||||
println commit_id
|
||||
|
||||
stage "build"
|
||||
def app = docker.build "library/x86_64/alpine/couchpotato"
|
||||
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user