Skip to content

Commit

Permalink
fix --read-only?
Browse files Browse the repository at this point in the history
  • Loading branch information
lillian committed Dec 29, 2023
1 parent 6a4b32a commit 596fb7d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions mediawiki/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM alpine:latest

RUN apk add unit-php82 php82-mysqli zip curl

WORKDIR /app

# Unit entrypoint, but config is in /app/config instead of /docker-entrypoint.d
RUN wget https://raw.githubusercontent.com/nginx/unit/d48180190752201865f41b2cf1e0a6740fa2ea59/pkg/docker/docker-entrypoint.sh
RUN sed -i 's/docker-entrypoint\.d/app\/config/g' docker-entrypoint.sh
RUN sed -i 's#exec "$@"#mount -t tmpfs none /var/lib/unit\n&#' docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

RUN sed -i 's#exec "$@"#(cd /app/mediawiki && php maintenance/run.php update)\n&#' docker-entrypoint.sh

RUN wget -O - https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz | tar xz && mv mediawiki-1.41.0 mediawiki

RUN (cd mediawiki/skins && wget -O - https://extdist.wmflabs.org/dist/skins/Modern-REL1_39-8d86fdf.tar.gz | tar xz)
RUN (cd mediawiki/skins && wget -O - https://extdist.wmflabs.org/dist/skins/CologneBlue-REL1_39-0b49913.tar.gz | tar xz)
RUN (cd mediawiki/extensions && wget -O - https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_41-964152c.tar.gz | tar xz)

WORKDIR /app/config
COPY config.json .

# mount ???

CMD [ "/app/docker-entrypoint.sh", "unitd", "--no-daemon", "--user", "nobody", "--group", "nobody" ]

0 comments on commit 596fb7d

Please sign in to comment.