diff --git a/Dockerfile b/Dockerfile index 48ed7fa..eaf407c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 MAINTAINER Marcel Otte -RUN apt-get update && apt-get install -y openjdk-8-jre wget unzip +RUN apt-get update && apt-get install -y openjdk-11-jre wget unzip RUN mkdir /terasology \ - && wget -P /terasology http://jenkins.terasology.org/job/DistroOmegaRelease/lastSuccessfulBuild/artifact/distros/omega/build/distributions/TerasologyOmega.zip \ + && wget -P /terasology http://jenkins.terasology.org/job/DistroOmega/lastSuccessfulBuild/artifact/distros/omega/build/distributions/TerasologyOmega.zip \ && unzip /terasology/TerasologyOmega.zip -d /terasology \ && rm -f /terasology/TerasologyOmega.zip -ENTRYPOINT java -jar /terasology/libs/Terasology.jar -headless -homedir=/terasology/server +ENTRYPOINT cd /terasology && java -Dterasology_variant=unstable -jar /terasology/libs/Terasology.jar -headless -homedir=/terasology/server -installPath=/terasology VOLUME /terasology/server EXPOSE 25777 diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..0d32185 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,7 @@ +node ('main') { + stage('docker') { + sh ''' + sh build.sh + ''' + } +} diff --git a/README.md b/README.md index fcf0dbc..e939760 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,25 @@ # docker-terasology -check out and build with -```docker build .``` +Automatic builds are provided by dockerhub and my own jenkins instance. +For all enthusiasts who just want to have a running server: +- `docker pull qwick/terasology:latest` +- or with version: `docker pull qwick/terasology:1.2.1-alpha` -or use the image on dockerhub: -https://registry.hub.docker.com/u/qwick/terasology/ +For all developers who want a unstable build for debugging or just testing purposes: +- `docker pull qwick/terasology:unstable-latest` +- a versioned tag is available too. -## Latest changes -### 2016-03-16: [Alpha release 1; Engine v1.0.0](https://github.com/MovingBlocks/Terasology/releases/tag/v1.0.0) -I'm again a little late with the docker image update, sorry! ;-) +Versioned tags may change over time. + +## Versioning + +To avoid confusion here the docker image tag schema: + +Stable: +- `-` e.g. `1.2.1-alpha` + +Unstable: +- `unstable--` e.g. `unstable-1.2.2-SNAPSHOT-1806` ## Small guide @@ -25,8 +36,6 @@ Best practice would be cloning this repository and using docker-compose to pull There may be standard configurations in the future for specific use cases, may be... ;-) -One thing's for sure, I'll keep this a little more updated after this long time of silence. - More information about terasology can be found on following sites: * https://github.com/MovingBlocks/Terasology * http://terasology.org/ diff --git a/build.sh b/build.sh index 3a37a5e..1da0022 100755 --- a/build.sh +++ b/build.sh @@ -1,14 +1,22 @@ #!/bin/bash +rm versionInfo.properties* -wget http://jenkins.terasology.org/job/TerasologyStable/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties +wget http://jenkins.terasology.org/job/Terasology/lastSuccessfulBuild/artifact/build/resources/main/org/terasology/version/versionInfo.properties source versionInfo.properties docker login -u $DOCKER_USER -p $DOCKER_PASSWORD TAGNAME=$engineVersion-$displayVersion +echo The dev-latest build is: $TAGNAME +TAGNAME=unstable-latest docker build --no-cache -t qwick/terasology:$TAGNAME . +NEW_TAGNAME=unstable-$engineVersion-$buildNumber + +docker tag qwick/terasology:$TAGNAME qwick/terasology:$NEW_TAGNAME + docker push qwick/terasology:$TAGNAME +docker push qwick/terasology:$NEW_TAGNAME diff --git a/docker-compose.yml b/docker-compose.yml index 894e49b..4d8ccf9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ terasology: - image: qwick/terasology:latest + image: qwick/terasology:dev-latest ports: - 25777:25777 volumes: - - /mnt/data/docker/terasology:/terasology/server + - ./terasology:/terasology/server