mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 14:22:27 +00:00
parent
b9787182e6
commit
3a64e32184
3 changed files with 30 additions and 0 deletions
|
@ -732,3 +732,11 @@ In order to adapt to differences in `UID` and `GID` settings the entry script wi
|
||||||
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||||
environment variable. Options like `-X` that need to proceed general JVM options can be passed
|
environment variable. Options like `-X` that need to proceed general JVM options can be passed
|
||||||
via a `JVM_XX_OPTS` environment variable.
|
via a `JVM_XX_OPTS` environment variable.
|
||||||
|
|
||||||
|
### HTTP Proxy
|
||||||
|
|
||||||
|
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's URL via the `PROXY`
|
||||||
|
environment variable. In [the example compose file](docker-compose-proxied.yml) it references
|
||||||
|
a companion squid proxy by setting the equivalent of
|
||||||
|
|
||||||
|
-e PROXY=proxy:3128
|
15
minecraft-server/docker-compose-proxied.yml
Normal file
15
minecraft-server/docker-compose-proxied.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
# TYPE: SPIGOT
|
||||||
|
# VERSION: 1.11.2
|
||||||
|
PROXY: proxy:3128
|
||||||
|
proxy:
|
||||||
|
image: sameersbn/squid
|
||||||
|
|
|
@ -29,6 +29,13 @@ if ! touch /data/.verify_access; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $PROXY ]]; then
|
||||||
|
export http_proxy="$PROXY"
|
||||||
|
export https_proxy="$PROXY"
|
||||||
|
echo "INFO: Giving proxy time to startup..."
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
|
||||||
export SERVER_PROPERTIES=/data/server.properties
|
export SERVER_PROPERTIES=/data/server.properties
|
||||||
export FTB_DIR=/data/FeedTheBeast
|
export FTB_DIR=/data/FeedTheBeast
|
||||||
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||||
|
|
Loading…
Reference in a new issue