docker-alpine
docker-alpine copied to clipboard
Do not use VOLUME
If you specify a volume in Dockerfile, it would be impossible to remove/override it using command line options. Moreover, it would leave dangling volumes for inexperienced users and users of docker-compose. In docker-compose, you wouldn't be able to specify mounted volume. Please let the user specify the volume location.
If you use your own volume attribute during run
or similar, it will use that and not the one in the Dockerfile. At least the one in the Dockerfile keeps it out of the container if someone doesn't specify a volume. I agree that it could/will lead to orphaned volumes but that seems like general issue not specific to this.
If you use your own volume attribute during run or similar, it will use that and not the one in the Dockerfile.
If it should, then it is a bug in docker-compose, because for me it doesn't work. There are dangling volumes all over the place.