Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Updated with badges
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Apr 1, 2018
1 parent 3d6705e commit 98e61f2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 50 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: generic
sudo: required
dist: trusty

services:
- docker

install:
- docker build .
- docker build .
after_script:
- "curl -X POST https://hooks.microbadger.com/images/qmcgaw/spigot/lbEkjAzMbHcPcjguFOT4-z7pDAY="
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
57 changes: 20 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 98e61f2

Please sign in to comment.