Skip to content

WIP: setup.sh review#1258

Closed
fbartels wants to merge 5 commits intodocker-mailserver:masterfrom
fbartels:testing
Closed

WIP: setup.sh review#1258
fbartels wants to merge 5 commits intodocker-mailserver:masterfrom
fbartels:testing

Conversation

@fbartels
Copy link
Copy Markdown
Member

@fbartels fbartels commented Sep 9, 2019

setup.sh is a mess. Lets see if it can be done better.

Comment thread setup.sh

IMAGE_NAME=$(echo $INFO | awk '{print $1}')
CONTAINER_NAME=$(echo $INFO | awk '{print $2}')
IMAGE_NAME=tvial/docker-mailserver:latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hard-coding the image may not be a good idea as there can be changes between latest, stable and versioned releases. We should ideally use the same version that the user intends to run (or is running). As a default image name this works fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I totally agree with that. In the end the script should check if there is any running container that is based on tvial/docker-mailserver.

Additionally the script has (at the moment) the ability to specify the name of the running container.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That feature (specifying container name) is used extensively from the tests and is important. It is probably less important in real life, in theory someone could run multiple docker images on the same server but that is bound to be exceedingly rare.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I do that @erik-wramner, I provide hosting and email services to customers
, I am starting to use the scenario with multiple docker instances on a single machine, (each for a customer) I think I can save money with cloud services in this way, I also thought of configuring it as a micro service, but the loading time prevents make that possible.

@erik-wramner
Copy link
Copy Markdown
Contributor

Can we wrap up this? Perhaps keep some of the not-very-nice code for backwards compatibility (and possible later action) to be able to merge the good parts? In particular we could keep the old image name code unless you have a better idea for finding it; just hard-coding latest will break things.

@erik-wramner
Copy link
Copy Markdown
Contributor

FYI this needs to be rebased to get the podman changes.

@fbartels
Copy link
Copy Markdown
Member Author

+1 yes, I need to get back to this at some time.

@erik-wramner erik-wramner linked an issue Aug 18, 2020 that may be closed by this pull request
@fbartels
Copy link
Copy Markdown
Member Author

Closing in favour of #1590

@fbartels fbartels closed this Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shellcheck & setup.sh

3 participants