4 ms·
> I'm not sure how I'd provision servers > I can just put shell commands in the Dockerfile. Can't you just put the shell commands in a shell script?
by combyn8tor 4y ago
> I'm not sure how I'd provision servers
> I can just put shell commands in the Dockerfile.
Can't you just put the shell commands in a shell script?
- foverzar 4y agoYou can do anything with a shell script, and typically you could use tools like Ansible to provision them - that would be similar to Docker's Dockerfile. Unlike shell script, you generally need to build Docker image only once though + it just feels faster and less cumbersome. I just use Docker whenever I need to run something on multiple machines. It essentially runs the same shell script, but I don't have to care for making sure the environment for the shell script is compatible (i.e. distribution version, os package dependencies and so on)
- combyn8tor 4y agoAre you deploying to servers that are already running other services? If so, why not just create a fresh VPS dedicated for your new deployment? Not saying either way is better or worse, just looking to understand why that may be the case.
- resonious 4y agoSure but then I have to make sure the commands work well for servers that are already half configured. With Dockerfiles, I can just be naive and write the scripts with the assumption that it's a fresh system every time.
- combyn8tor 4y agoRight, I can see your point but I just want to understand a bit more... why would some servers be half configured already? When you fire up a new server don't you just select a standard distro image? What happens when the Docker image is updated?