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

Minor Dockerfile Improvements #23

Merged
merged 3 commits into from
Feb 25, 2021
Merged

Minor Dockerfile Improvements #23

merged 3 commits into from
Feb 25, 2021

Conversation

clairmont32
Copy link
Contributor

Fixes #22 to edit config files
Fixes a dependency issue with SDL2 being required instead of 1.2. I left that version in case other packages needed to reference it.

Built the image locally and used it to start a Valheim server without any further errors.

Dockerfile Outdated Show resolved Hide resolved
@clairmont32
Copy link
Contributor Author

Doh! I was playing with some possible build efficiencies and accidentally left those in. Will remove the extraneous newlines tonight.

@clairmont32 clairmont32 requested a review from h3o66 February 18, 2021 16:34
Copy link
Member

@h3o66 h3o66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my side ok

@clairmont32
Copy link
Contributor Author

Just curious, is there anything further needed from me to have this merged?

@dgibbs64
Copy link
Member

No it's just lack of bandwidth on my end (I have a lot going on). I will be scheduling some time to look at docker soon. 👍

@dgibbs64 dgibbs64 merged commit 6ee9dd3 into GameServerManagers:master Feb 25, 2021
@clairmont32
Copy link
Contributor Author

How can I help? I just joined the Discord server as Grenade32#6137 so I'm able to chat with your (or others) there.

dgibbs64 added a commit that referenced this pull request Apr 2, 2021
* Update LICENSE

* Fix dependencies

Lgsm uses the 'ip' command several times. The docker image is missing
this command. The missing command is part of the package 'iproute2'.

* Update Dockerfile

* Update Dockerfile

* Removed redundant adduser call which was preventing docker build from succeeding.

* style: Better shell debugging with Docker builds

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

* Minor Dockerfile Improvements (#23)

* Readme improvements (#24)

* add detach mode and port range example

* remove publish ports due to --net

* Readme update example

fixed volume mapping in docker run example.

* Feat: Added basic docker-compose.yaml example

This docker-compose.yaml will function exactly like the example docker run command.

* add exec to entrypoint (#31)

* Readme update example (#28)

fixed volume mapping in docker run example.

* Feat: docker-compose example (#30)

* Readme update example

fixed volume mapping in docker run example.

* Feat: Added docker-compose example

Added an docker-compose.yaml example that matches the docker run example from PR #28 with 1:1 functionality.

* feat: added user tag to docker run and compose examples

These new args in the docker run example and docker compose example will now dictate what uid and gid are assigned to linuxgsm inside of the dockerfile.

Co-authored-by: Daniel Gibbs <[email protected]>
Co-authored-by: Johannes Rothmayr <[email protected]>
Co-authored-by: Jason Lash <[email protected]>
Co-authored-by: Sam Gleske <[email protected]>
Co-authored-by: Matthew Clairmont <[email protected]>
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.

Several questions
3 participants