-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lillian
committed
Dec 29, 2023
1 parent
6a4b32a
commit 596fb7d
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |