From fcf04ef6510d2a7e8a263f41c13724950052a9be Mon Sep 17 00:00:00 2001 From: fanyx Date: Sun, 26 Jun 2022 17:55:35 +0200 Subject: [PATCH] Rework image to use s6-overlay to run TMServer and Xaseco - Adds S6-Overlay - Bundles Xaseco into the image --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..334d726 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM php:5.6-alpine +ARG S6_OVERLAY_VERSION=3.1.1.1 + +RUN apk add --no-cache pwgen gettext xmlstarlet bash xz +RUN docker-php-ext-install mysql + +COPY tmserver/ /var/lib/tmserver +COPY xaseco/ /var/lib/xaseco + +RUN addgroup -S trackmania && adduser -D -H -S trackmania -G trackmania +RUN chown -R trackmania:trackmania /var/lib/tmserver /var/lib/xaseco + +EXPOSE 5000 + +CMD ["/var/lib/tmserver/entrypoint.sh"] + +ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp +RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz +ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp +RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz +ENTRYPOINT ["/init"] + +RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/xaseco +COPY services.d/xaseco/ /etc/s6-overlay/s6-rc.d/xaseco/