-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VOLUME declaration can result in difficult to diagnose misbehavior #410
Comments
https://docs.docker.com/engine/reference/builder/#volume
I also tried redeclaring the VOLUME after making the desired changes, however the behavior remains unchanged: FROM rabbitmq:3.8
RUN echo "test" > ${RABBITMQ_DATA_DIR}/test.txt && cat ${RABBITMQ_DATA_DIR}/test.txt
VOLUME $RABBITMQ_DATA_DIR docker build . -t dvdt
docker run --rm -it dvdt /bin/cat /var/lib/rabbitmq/test.txt which prints /bin/cat: /var/lib/rabbitmq/test.txt: No such file or directory So, I believe the only available solution is to drop the VOLUME declaration from the Dockerfile. |
Other discussions on removing inherent volumes in images docker-library/mongo#306, redis/docker-library-redis#140, docker-library/postgres#404, docker-library/mysql#255 docker-library/cassandra#180 (comment)
|
I'd like to propose #416 as a solution with minimal maintenance overhead. |
Yeah, that is a known issue: moby/moby#3639 i always had to replace the volume-command manually in a fork of that image |
Closing since the behavior reported in this comment does not seem to be the case anymore. Please see the following project for the https://github.com/lukebakken/docker-library-rabbitmq-410 |
By declaring the VOLUME $RABBITMQ_DATA_DIR in the base Dockerfile, (i.e.
rabbitmq/3.8/ubuntu/Dockerfile
Line 257 in 91be7cf
rabbitmq-plugins
were to change such that relies on modifying the data dir, the management Dockerfile would at least partially break.The text was updated successfully, but these errors were encountered: