forked from BenTech2/syncplay-server
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
42 lines (32 loc) · 1003 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.7-alpine as build
RUN apk add --no-cache --progress \
build-base \
cargo \
git \
libffi-dev \
openssl-dev
WORKDIR /source
RUN git clone --depth=1 --branch=v1.7.3 https://github.com/syncplay/syncplay.git ./ && \
echo "" > requirements_gui.txt
WORKDIR /wheels
RUN pip install -U pip
# Unless this environment variable is set, Syncplay's setup.py tries to grab GUI dependencies
RUN SNAPCRAFT_PART_BUILD=1 pip wheel file:///source#egg=syncplay
FROM python:3.7-alpine
RUN apk add --no-cache --update --progress \
openssl \
libffi
COPY --from=build /wheels /wheels
WORKDIR /wheels
RUN pip install *.whl
# Run as non-root user
ARG USER_UID=800
ARG USER_GID=800
WORKDIR /app/syncplay
RUN addgroup -g "${USER_GID}" -S syncplay && \
adduser -u "${USER_UID}" -S syncplay -G syncplay && \
chown -R syncplay:syncplay /app/syncplay
COPY ./entrypoint.sh /entrypoint.sh
EXPOSE 8999
USER syncplay
ENTRYPOINT ["/entrypoint.sh"]