2017-11-17 21:00 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0013811CentOS-7dockerpublic2017-09-14 15:18
ReporterPIlarGomez 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Version7.3.1611 
Target VersionFixed in Version 
Summary0013811: Any changes done in /var/www/ are lost when using centos/httpd-24-centos7 as the base image
DescriptionWhen trying to use the official centos/httpd-24-centos7 image (latest), any changes done inside the /var/www WITHIN THE DOCKERFILE are lost.
I don't know if this is a mac-only issue or a generic one (I only have an OSX environment to try it on, but I have seen issues before around CentOS and Atomic and the /var directory, related to mounts, shm and secrets folder, so I thought it may belong here).
Steps To Reproduce1. Create a simple Dockerfile derived from the offical centos one. For example:
SysAdmins-MacBook-Pro:test pilar.gomez$ cat Dockerfile
FROM centos/httpd-24-centos7

RUN mkdir -p /var/www
RUN touch /var/www/test1 && touch /var/www/test2

CMD sleep infinity

2. Build and run the image:
$ docker build -t centos_test .
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos_test latest 7b95b3b3ddda 7 seconds ago 335MB
$ docker run --name centos_container -d centos_test
63ee6ee0111bda0272ff23ea011e1618c075d8e0bb391e4871bed29bc4502758

3. Log into the container:
$ docker exec -it centos_container bash
bash-4.2$

4. Check that our files are not in /var/www as we would expect:
bash-4.2$ ls -l /var/www
total 8
drwxr-xr-x 2 default root 4096 Apr 27 12:18 cgi-bin
drwxr-xr-x 2 default root 4096 Apr 27 12:18 html

Our test1 and test2 files are nowhere to be seen!
Additional InformationSorry if I messed up with the OS/Version fields. I did my best :)
TagsNo tags attached.
abrt_hash
URL
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2017-09-14 15:18 PIlarGomez New Issue
+Issue History