From 98e61f2600e0304c17c6782097d10092938b6f6a Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sun, 1 Apr 2018 14:53:37 -0400 Subject: [PATCH] Updated with badges --- .travis.yml | 8 +++----- Dockerfile | 19 ++++++++++-------- README.md | 57 +++++++++++++++++++---------------------------------- 3 files changed, 34 insertions(+), 50 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e024b0..ce2a028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,7 @@ language: generic -sudo: required -dist: trusty - services: - docker - install: - - docker build . \ No newline at end of file + - docker build . +after_script: + - "curl -X POST https://hooks.microbadger.com/images/qmcgaw/spigot/lbEkjAzMbHcPcjguFOT4-z7pDAY=" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 59a1580..ac768bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ FROM openjdk:8-jre-alpine -MAINTAINER quentin.mcgaw@gmail.com -RUN mkdir -p /usr/src/spigot -WORKDIR /usr/src/spigot -ENV JAVA_OPTS="-Xms512m -Xmx1800m" -VOLUME /usr/src/spigot -EXPOSE 25565 -ENTRYPOINT ["java", "-jar", "/usr/src/spigot/spigot-1.12.2.jar"] -CMD ["nogui"] +LABEL maintainer="quentin.mcgaw@gmail.com" \ + description="VPN client container to private internet access servers based on Alpine Linux and OpenVPN" \ + download="53.9MB" \ + size="?MB" \ + ram="300MB" \ + cpu_usage="Medium" \ + github="https://github.com/qdm12/spigot-docker" +RUN mkdir /spigot +ENV JAVA_OPTS -Xms512m -Xmx1800m +ENTRYPOINT java -jar /spigot/spigot-1.12.2.jar +CMD ["nogui"] \ No newline at end of file diff --git a/README.md b/README.md index d3cb523..3919f4c 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,18 @@ [![Build Status](https://travis-ci.org/qdm12/spigot-docker.svg?branch=master)](https://travis-ci.org/qdm12/spigot-docker) +[![](https://images.microbadger.com/badges/image/qmcgaw/spigot.svg)](https://microbadger.com/images/qmcgaw/spigot) +[![](https://images.microbadger.com/badges/version/qmcgaw/spigot.svg)](https://microbadger.com/images/qmcgaw/spigot) + + +| Download size | Image size | RAM usage | CPU usage | +| --- | --- | --- | --- | +| 53.9MB | ?MB | 300MB | Medium | + Based on: - Alpine Linux - OpenJDK JRE 8 -It uses 300MB of RAM and a low percentage of CPU - ## Installation ### Spigot MC @@ -18,45 +24,22 @@ It uses 300MB of RAM and a low percentage of CPU - Option 1 of 2: Create a Spigot Server from nothing 1. Download the latest [Buildtools](https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar). - 2. Follow the instructions to build **spigot-X.XX.X.jar** on [https://www.spigotmc.org/wiki/buildtools/](https://www.spigotmc.org/wiki/buildtools/) on your machine. - 3. From here, let the host path to your Spigot MC server directory be `my/path/spigot`. - 4. Once the **spigot-X.XX.X.jar** is created, move it in the directory `my/path/spigot`. - 5. In the directory `my/path/spigot`, create a file *eula.txt* with the content `eula=true` to accept the SpigotMC license. + 1. Follow the instructions to build **spigot-X.XX.X.jar** on [https://www.spigotmc.org/wiki/buildtools/](https://www.spigotmc.org/wiki/buildtools/) on your machine. + 1. From here, let the host path to your Spigot MC server directory be `/yourpath/spigot`. + 1. Once the **spigot-X.XX.X.jar** is created, move it in the directory `/yourpath/spigot`. + 1. In the directory `my/path/spigot`, create a file *eula.txt* with the content `eula=true` to accept the SpigotMC license. - Option 2 of 2: You already have a Spigot MC server directory - 1. From here, let the host path to your Spigot MC server directory be `my/path/spigot` - 2. Move your server files to `my/path/spigot` + 1. From here, let the host path to your Spigot MC server directory be `/yourpath/spigot` + 1. Move your server files to `/yourpath/spigot` -### Obtaining the Docker image - -- Option 1 of 2: Automatically download from the Docker Hub registry, go to the next section -- Option 2 of 2: Build the image - 1. Download the repository files - 2. With a terminal, change to the directory of the repository - 3. Enter the following: - - ```bash - sudo docker build -t qmcgaw/spigot ./ - ``` +### Launching the Docker container -### Launching the Docker container from the image - -1. Enter the following line to test the server interactively: - - ```bash - sudo docker run -it --rm --name=spigotTEST -p 35565:25565 \ - -v '/my/path/spigot:/usr/src/spigot' qmcgaw/spigot - ``` - - Note that you can change `/my/path/spigot` to another path where your server files are. - - We bind the host port **35565** to the minecraft default server port **25565**. You can change that. - -2. To run the server as a daemon: +Enter the following and change `yourpath` and optionally the port mapping `25565:25565` - ```bash - sudo docker run -d --name=spigot --restart=always -p 37050:25565 \ - -v '/my/path/spigot:/usr/src/spigot' qmcgaw/spigot - ``` +```bash +sudo docker run -d --name=spigot --restart=always -p 25565:25565 \ +-v '/yourpath/spigot:/spigot' qmcgaw/spigot +``` ### Others