3.11.3 #1
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
# Base on latest (edge) alpine image
|
||||
FROM opensuse/leap:15.1
|
||||
|
||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||
|
||||
# Install updates
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LANGUAGE='en_US.UTF-8' \
|
||||
TERM='xterm' \
|
||||
PM_USER='pmmp' \
|
||||
PM_GROUP='pmmp' \
|
||||
PM_UID='1003' \
|
||||
PM_GID='1003'
|
||||
|
||||
RUN zypper in -n tar get gzip
|
||||
RUN groupadd -g $PM_GID $PM_GROUP
|
||||
RUN useradd -D -u $PM_UID -g $PM_GROUP -M $PM_USER
|
||||
RUN mkdir /pmmp
|
||||
RUN chown $PM_USER:$PM_GROUP /pmmp
|
||||
RUN cd /pmmp
|
||||
RUN wget -q -O - https://jenkins.pmmp.io/job/PHP-7.3-Aggregate/lastSuccessfulBuild/artifact/PHP-7.3-Linux-x86_64.tar.gz > /pmmp/PHP-7.3-Linux-x86_64.tar.gz
|
||||
RUN tar zxvf PHP-7.3-Linux-x86_64.tar.gz
|
||||
RUN rm PHP-7.3-Linux-x86_64.tar.gz
|
||||
RUN wget -q -O - https://github.com/pmmp/PocketMine-MP/releases/download/3.9.5/PocketMine-MP.phar > /pmmp/PocketMine-MP.phar
|
||||
RUN wget -q -O - https://raw.githubusercontent.com/pmmp/PocketMine-MP/master/start.sh > /pmmp/start.sh
|
||||
RUN chmod 755 start.sh
|
||||
RUN chown -R $PM_USER:$PM_GROUP /pmmp
|
||||
|
||||
VOLUME /plugins
|
||||
VOLUME /config
|
||||
|
||||
EXPOSE 19132/udp
|
||||
|
||||
USER $PM_USER
|
||||
|
||||
CMD [ "/pmmp/bin/php7/bin/php", "/pmmp/PocketMine-MP.phar", "--no-wizard", "--enable-ansi", "--data=/config", "--plugins=/plugins" ]
|
||||
26
Jenkinsfile
vendored
Normal file
26
Jenkinsfile
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
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-suse-pocketmine", credentialsId: 'jenkins-to-git'
|
||||
|
||||
sh "git rev-parse HEAD > .git/commit-id"
|
||||
def commit_id = readFile('.git/commit-id').trim()
|
||||
println commit_id
|
||||
|
||||
try {
|
||||
stage "build"
|
||||
def app = docker.build "library/x86_64/suse/pocketmine"
|
||||
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
|
||||
stage('Deploy on K8s'){
|
||||
sh "/usr/local/bin/kubectl -n test delete po pocketmine-0"
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user