diff --git a/Dockerfile b/Dockerfile index da78945..4b98771 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,16 +9,14 @@ WORKDIR ./syncplay-${SYNCPLAY}/ RUN cat /dev/null > requirements_gui.txt RUN SNAPCRAFT_PART_BUILD=1 pip wheel --wheel-dir /wheels/ ./ WORKDIR /wheels/ -RUN pip install *.whl RUN ls *.whl | xargs -P0 -n1 unzip -d /unzip/ -WORKDIR /release/lib/python3.7/ +WORKDIR /release/local/lib/python3.7/ RUN cp -r /unzip/ ./site-packages/ -WORKDIR /release/bin/ -RUN cp /usr/local/bin/syncplay-server ./ -COPY ./init.sh ./syncplay +COPY ./boot.py /release/bin/syncplay FROM ${PYTHON} RUN apk add --no-cache libffi openssl -COPY --from=build /release/ /usr/local/ +COPY --from=build /release/ /usr/ +ENV PYTHONUNBUFFERED=1 EXPOSE 8999 ENTRYPOINT ["syncplay"] diff --git a/boot.py b/boot.py new file mode 100755 index 0000000..f833825 --- /dev/null +++ b/boot.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import os +import sys +import time + +# def runSyncplay(args: list, envs: dict) -> None: +# os.execvpe('syncplay-server', ['syncplay-server'] + args, envs) + +# runSyncplay(['--password', 'test'], {'PYTHONUNBUFFERED': '1'}) + +print(sys.argv) +print(os.environ) + +time.sleep(200)