Initial commit
This commit is contained in:
commit
1c84cdba3f
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*~
|
||||||
|
.*~
|
||||||
|
|
22
.gitlab-ci.yml
Normal file
22
.gitlab-ci.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
image: docker:stable
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
IMAGE_NAME: registry.gitlab.com/wolutator/bukkit-docker
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- hottis
|
||||||
|
- linux
|
||||||
|
- docker
|
||||||
|
script:
|
||||||
|
- VERSION=`cat VERSION`
|
||||||
|
- echo "Version is $VERSION"
|
||||||
|
- docker build --build-arg BUKKIT_VERSION=$VERSION --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION .
|
||||||
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
|
- docker push $IMAGE_NAME:latest
|
||||||
|
- docker push $IMAGE_NAME:$VERSION
|
||||||
|
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM openjdk:8u242-jdk-buster
|
||||||
|
|
||||||
|
LABEL Maintainer="Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>"
|
||||||
|
LABEL ImageName="registry.gitlab.com/wolutator/bukkit-docker"
|
||||||
|
LABEL AlternativeImageName="wollud1969/bukkit-docker"
|
||||||
|
|
||||||
|
ARG BUKKIT_VERSION
|
||||||
|
ARG BUILD_DIR=/minecraft-build
|
||||||
|
ARG APP_DIR=/minecraft
|
||||||
|
ARG USER=minecraft
|
||||||
|
ARG UID=25565
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
mkdir $BUILD_DIR && cd $BUILD_DIR && \
|
||||||
|
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||||
|
java -jar BuildTools.jar --rev $BUKKIT_VERSION && \
|
||||||
|
mkdir $APP_DIR && cd $APP_DIR && \
|
||||||
|
cp $BUILD_DIR/spigot-*.jar $APP_DIR/spigot.jar && \
|
||||||
|
useradd -d $APP_DIR -u $UID $USER
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
EXPOSE 25565
|
||||||
|
WORKDIR /data
|
||||||
|
USER $UID:$UID
|
||||||
|
|
||||||
|
CMD [ "java", "-jar", "$APP_DIR/spigot.jar" ]
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user