|
@ -1,4 +1,5 @@ |
|
|
ARG PYTHON="python:3.10-alpine3.18" |
|
|
ARG PYTHON="python:3.10-alpine3.18" |
|
|
|
|
|
ARG RUNAS="root" |
|
|
|
|
|
|
|
|
FROM ${PYTHON} AS builder |
|
|
FROM ${PYTHON} AS builder |
|
|
ENV SYNCPLAY="1.7.3" |
|
|
ENV SYNCPLAY="1.7.3" |
|
@ -18,16 +19,20 @@ RUN mkdir $(basename /usr/local/lib/python3.*/) && cd ./python3.*/ && \ |
|
|
ls /wheels/*.whl | xargs -P0 -n1 unzip -d ./site-packages/ |
|
|
ls /wheels/*.whl | xargs -P0 -n1 unzip -d ./site-packages/ |
|
|
COPY ./boot.py /release/bin/syncplay |
|
|
COPY ./boot.py /release/bin/syncplay |
|
|
|
|
|
|
|
|
FROM ${PYTHON} |
|
|
FROM ${PYTHON} AS root |
|
|
ARG USER_UID=800 |
|
|
|
|
|
ARG USER_GID=800 |
|
|
|
|
|
RUN sh -c '[ $(getconf LONG_BIT) -eq 64 ] || apk add --no-cache libgcc' |
|
|
RUN sh -c '[ $(getconf LONG_BIT) -eq 64 ] || apk add --no-cache libgcc' |
|
|
COPY --from=syncplay /release/ /usr/ |
|
|
COPY --from=syncplay /release/ /usr/ |
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
EXPOSE 8999 |
|
|
EXPOSE 8999 |
|
|
WORKDIR /data/ |
|
|
WORKDIR /data/ |
|
|
|
|
|
|
|
|
|
|
|
FROM root AS user |
|
|
|
|
|
ARG USER_UID=800 |
|
|
|
|
|
ARG USER_GID=800 |
|
|
RUN addgroup -g "${USER_GID}" -S syncplay && \ |
|
|
RUN addgroup -g "${USER_GID}" -S syncplay && \ |
|
|
adduser -u "${USER_UID}" -S syncplay -G syncplay && \ |
|
|
adduser -u "${USER_UID}" -S syncplay -G syncplay && \ |
|
|
chown -R syncplay:syncplay /data |
|
|
chown -R syncplay:syncplay /data |
|
|
USER syncplay |
|
|
USER syncplay |
|
|
|
|
|
|
|
|
|
|
|
FROM ${RUNAS} |
|
|
ENTRYPOINT ["syncplay"] |
|
|
ENTRYPOINT ["syncplay"] |
|
|