This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
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" | ||
ENTRYPOINT ["java", "-jar", "/usr/src/spigot/spigot-1.12.2.jar"] | ||
CMD ["nogui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,66 @@ | ||
# spigot-docker | ||
Docker container for Spigot server | ||
# Spigot Docker | ||
|
||
[](https://hub.docker.com/u/qmcgaw/spigot) | ||
|
||
Based on: | ||
- Alpine Linux | ||
- OpenJDK JRE 8 | ||
|
||
It uses 300MB of RAM and a low percentage of CPU | ||
|
||
## Installation | ||
|
||
### Spigot MC | ||
|
||
[](https://www.spigotmc.org) | ||
|
||
- 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. | ||
- 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` | ||
|
||
### Obtaining the Docker image | ||
|
||
- Option 1 of 2: Obtain from Docker Hub | ||
|
||
[](https://www.docker.com/) | ||
|
||
```bash | ||
sudo docker pull qmcgaw/spigot-docker | ||
``` | ||
|
||
- 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 from the image | ||
|
||
1. Enter the following line to test the server interactively: | ||
```bash | ||
sudo docker run -it --rm --name=spigotTEST -v '/my/path/spigot:/usr/src/spigot' -p 35565:25565 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: | ||
|
||
```bash | ||
sudo docker run -d --name=spigot --restart=always -v '/my/path/spigot:/usr/src/spigot' -p 37050:25565 qmcgaw/spigot | ||
``` | ||
|
||
### Others | ||
|
||
I recommend using the [Hibernate plugin](https://www.spigotmc.org/resources/hibernate.4441/) for your Spigot Docker server | ||
|
||
[](https://www.spigotmc.org/resources/hibernate.4441/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.