Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Initial Draft for Docker-Compose #29

Closed
wants to merge 13 commits into from
Closed

Initial Draft for Docker-Compose #29

wants to merge 13 commits into from

Conversation

clairmont32
Copy link
Contributor

Not complete, but provides a good start to a fully automated docker-compose solution.

Added a bootstrap installer to aid calling the current linuxgsm.sh, starting the gameserver install and starting the server with its current default settings.

Need to work through config management and maintaining a constantly running PID 1 process so the container doesnt die after everything is done.

dgibbs64 and others added 12 commits November 14, 2019 10:14
Lgsm uses the 'ip' command several times. The docker image is missing
this command. The missing command is part of the package 'iproute2'.
Removed redundant adduser call
Every `RUN` step in Docker launches a `/bin/sh` subshell.  Because of
this, you can use standard shell options supported by `/bin/sh`.

> **Please Note**: I have not added or removed anything from the Docker
> image.  I just added a few debug options to make build output more
> clear.

Changes made:

- Every `RUN` step starts with `set -ex`.  Refer to [The Set Builtin in
  the Bash manual][1] to learn more about `set -e` and `set -x`
  respectively.
- Because `set -ex` is used, semi-colon commands and ampersand separated
  commands have the same effect... bash will exit on first error.  So I
  changed all of the commands to be semi-colon separated.

  ```bash
  command1 && command2

  # the following means the exact same thing
  set -ex;
  command1;
  command2;
  ```

- I de-indented all of the `RUN` commands.  It's my personal opinion that
  all commands should be de-indented unless they're sub-options to a
  preceding command (like the package list on `apt-get install`).  Every
  Dockerfile command should be separated by a blank newline for
  readability.
- In the `apt-get install` package list which lists one package per line,
  I sorted the package list.

How has this changed behavior?

When you run the following command:

    docker build . -t lgsm

You will now see shell commands show up in red as they are executed.
e.g. you'll see every `apt-get` command, `rm`, and any other commands run
as they're executed.  So if one of the commands throws an error you'll
see which command was the problem, specifically.

[1]: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html#The-Set-Builtin
@clairmont32
Copy link
Contributor Author

Also this may be better suited under a new branch instead of develop but that's obviously up to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants