on-internet
← Community

Writing to docker volume from Dockerfile does not work

Stack Overflow ·

Please consider the following Dockerfile: FROM phusion/baseimage VOLUME ["/data"] RUN touch /data/HELLO RUN ls -ls /data Problem: "/data" directory does not contain "HELLO" file. Moreover, any other attempts to write to volume directory (via echo, mv, cp, ...) are unsuccessful - the directory is always empty. No error messages shown. I could not find anything in documentation or on stackoverflow regarding this problem. Is this something well-known or new? docker version returns: Client version: 1.2.0 Client API version: 1.14 Go version (client): go1.3.1 Git commit (client): fa7b24f OS/Arch (cl

Comments

Sign in or sign up to comment and upvote.

No comments yet.