Add help command

This commit is contained in:
Knut Ahlers 2016-12-15 01:42:19 +01:00
parent d8b6a3c4d3
commit 1bd022e6f9
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@ ENV FACTORIO_SERVER_VERSION 0.14.21
ENTRYPOINT ["/opt/defaults/start.sh"] ENTRYPOINT ["/opt/defaults/start.sh"]
EXPOSE 34197/udp EXPOSE 34197/udp
CMD ["--help"] CMD ["help"]
ADD https://www.factorio.com/get-download/${FACTORIO_SERVER_VERSION}/headless/linux64 /tmp/factorio.tgz ADD https://www.factorio.com/get-download/${FACTORIO_SERVER_VERSION}/headless/linux64 /tmp/factorio.tgz
ADD . /opt/defaults ADD . /opt/defaults

View file

@ -28,6 +28,10 @@ case ${ACTION} in
[ -e server-settings.json ] || cp /opt/defaults/server-settings.json server-settings.json [ -e server-settings.json ] || cp /opt/defaults/server-settings.json server-settings.json
exec ${BINARY} --server-settings server-settings.json --start-server ${MAP_FILE} exec ${BINARY} --server-settings server-settings.json --start-server ${MAP_FILE}
;; ;;
"help")
echo "Usage: docker run quay.io/luzifer/factorio [init | create | start]"
echo
echo "Alternative: docker run quay.io/luzifer/factorio <factorio server options>"
*) *)
exec ${BINARY} "$@" exec ${BINARY} "$@"
;; ;;