Browse Source

feat: docker of syncplay

pull/2/head
dnomd343 2 years ago
commit
7f21fe4d25
  1. 13
      Dockerfile
  2. 18
      init.sh

13
Dockerfile

@ -0,0 +1,13 @@
FROM python:3.7-alpine as build
RUN apk add build-base cargo git libffi-dev openssl-dev && \
pip install -U pip && cd / && mkdir wheels && \
git clone --depth=1 --branch=v1.6.9 https://github.com/syncplay/syncplay.git && \
echo "" > syncplay/requirements_gui.txt && \
cd wheels && SNAPCRAFT_PART_BUILD=1 pip wheel file:///syncplay#egg=syncplay
FROM python:3.7-alpine
COPY ./init.sh /syncplay
COPY --from=build /wheels /wheels
RUN apk add --no-cache openssl libffi && pip install /wheels/*.whl
EXPOSE 8999
ENTRYPOINT ["/syncplay"]

18
init.sh

@ -0,0 +1,18 @@
#!/bin/sh
args="--salt=$SALT"
[ -n "$TLS" ] && args="$args --tls=$TLS"
[ -n "$PORT" ] && args="$args --port=$PORT"
[ -n "$ISOLATE" ] && args="$args --isolate-rooms"
[ -n "$PASSWORD" ] && args="$args --password=$PASSWORD"
if [ -n "$MOTD" ]; then
echo "$MOTD" >> /app/syncplay/motd
args="$args --motd-file=/app/syncplay/motd"
fi
PYTHONUNBUFFERED=1 exec syncplay-server $args $@
Loading…
Cancel
Save