WIP: setup.sh review#1258
Conversation
Signed-off-by: Felix Bartels <[email protected]>
Signed-off-by: Felix Bartels <[email protected]>
Signed-off-by: Felix Bartels <[email protected]>
Signed-off-by: Felix Bartels <[email protected]>
|
|
||
| IMAGE_NAME=$(echo $INFO | awk '{print $1}') | ||
| CONTAINER_NAME=$(echo $INFO | awk '{print $2}') | ||
| IMAGE_NAME=tvial/docker-mailserver:latest |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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. |
|
FYI this needs to be rebased to get the podman changes. |
|
+1 yes, I need to get back to this at some time. |
|
Closing in favour of #1590 |
setup.sh is a mess. Lets see if it can be done better.