We need to set up the volume when the container runs, not when it is built, because mounting a volume over /var/lib/mediawiki will shadow the contents of that directory in the image.
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -5,17 +5,18 @@
|
|||||||
FROM tutum/apache-php:latest
|
FROM tutum/apache-php:latest
|
||||||
MAINTAINER John E Arnold <iohannes.eduardus.arnold@gmail.com>
|
MAINTAINER John E Arnold <iohannes.eduardus.arnold@gmail.com>
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
# Remove the old hello world app and grab Mediawiki source
|
# Remove the old hello world app and grab Mediawiki source
|
||||||
|
RUN apt-get update && apt-get install -yq git && rm -rf /var/lib/apt/lists/*
|
||||||
RUN rm -fr /app && git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git /app
|
RUN rm -fr /app && git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git /app
|
||||||
RUN cd /app && git checkout -b REL1_23 origin/REL1_23
|
RUN cd /app && git checkout -b REL1_23 origin/REL1_23
|
||||||
|
|
||||||
# Create the section for persistent files
|
# Create the section for persistent files
|
||||||
RUN mkdir /var/lib/mediawiki
|
RUN mkdir /var/lib/mediawiki
|
||||||
|
|
||||||
# Move the files that need to be persistent and create symbolic links to them
|
ADD setup.sh /setup.sh
|
||||||
RUN mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images
|
RUN chmod +x setup.sh
|
||||||
RUN mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins
|
|
||||||
RUN touch /var/lib/mediawiki/LocalSettings.php && ln -s /var/lib/mediawiki/LocalSettings.php /app/LocalSettings.php
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["/run.sh"]
|
CMD ./setup.sh && ./run.sh
|
||||||
|
Reference in New Issue
Block a user