Initial commit

This commit is contained in:
Wolfgang Hottgenroth 2020-04-06 17:15:36 +02:00
commit 1c84cdba3f
4 changed files with 53 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*~
.*~

22
.gitlab-ci.yml Normal file
View 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
View 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" ]

1
VERSION Normal file
View File

@ -0,0 +1 @@
1.15.2