> 2. Copy a file into a container with docker-compose, without requiring Swarm
I'm not quite sure I see why you can't get by with "docker cp" and need compose to resolve the container.
But I also were unaware of the Docker sub commands "cp" and "commit".
I think I prefer building containers and mounting config - but I see how the two could be abused, focusing on images rather than Dockerfile-s (and woe to the person that looses the carefully evolved Debian old-stable based base image that runs a mix of outdated oldstable packages and a few bits from current stable from two years ago when they were in testing, along with a custom build of node 13 and an outdated driver for a proprietary database...).
Not sure I believe it's a good idea, but now I know it's possible.
> 2. Copy a file into a container with docker-compose, without requiring Swarm
I'm not quite sure I see why you can't get by with "docker cp" and need compose to resolve the container.
But I also were unaware of the Docker sub commands "cp" and "commit".
I think I prefer building containers and mounting config - but I see how the two could be abused, focusing on images rather than Dockerfile-s (and woe to the person that looses the carefully evolved Debian old-stable based base image that runs a mix of outdated oldstable packages and a few bits from current stable from two years ago when they were in testing, along with a custom build of node 13 and an outdated driver for a proprietary database...).
Not sure I believe it's a good idea, but now I know it's possible.
https://thenewstack.io/container-basics-how-to-commit-change...