From 0a50f9facdc4c207b81cbb74e6b34477fb031e2d Mon Sep 17 00:00:00 2001 From: Yatima Date: Wed, 17 Feb 2021 15:47:27 +0100 Subject: [PATCH 1/8] Create Dockerfile --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..77b4a8a7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:18.04 + +ENV VERSION="v1.6.7" +ENV PASSWORD="changethis" +ENV MOTD="Welcome to our Docker Syncplay server!" +ENV PORT=8999 +ENV SALT="changethis" + +RUN apt update +RUN apt-get install -y make git python3 python3-twisted python3-pyside +RUN git checkout $VERSION +RUN make install + +EXPOSE $PORT + +CMD echo $MOTD > motd.txt && syncplay-server --password $PASSWORD --port $PORT --salt $SALT --motd-file motd.txt From 8662f512ef0d48d741dd9301fdd3a62c806edde5 Mon Sep 17 00:00:00 2001 From: Yatima Date: Wed, 17 Feb 2021 15:52:35 +0100 Subject: [PATCH 2/8] Update Dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77b4a8a7e..662ebac0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ FROM ubuntu:18.04 -ENV VERSION="v1.6.7" -ENV PASSWORD="changethis" ENV MOTD="Welcome to our Docker Syncplay server!" ENV PORT=8999 +ENV PASSWORD="changethis" ENV SALT="changethis" RUN apt update -RUN apt-get install -y make git python3 python3-twisted python3-pyside -RUN git checkout $VERSION +RUN apt-get install -y make python3 python3-twisted python3-pyside RUN make install EXPOSE $PORT From c65af19b2eb4eeba125a14bbbe25dcd8fdffd76b Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Wed, 17 Feb 2021 16:34:08 +0100 Subject: [PATCH 3/8] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 662ebac0e..da2a2f116 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,9 @@ ENV SALT="changethis" RUN apt update RUN apt-get install -y make python3 python3-twisted python3-pyside -RUN make install + +COPY . /syncplay +RUN cd syncplay && make install . EXPOSE $PORT From d5096dc3482bab84d301afbde716a5d8f127b537 Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Wed, 17 Feb 2021 16:42:12 +0100 Subject: [PATCH 4/8] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da2a2f116..6746701bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apt update RUN apt-get install -y make python3 python3-twisted python3-pyside COPY . /syncplay -RUN cd syncplay && make install . +RUN cd syncplay && make install EXPOSE $PORT From 31a7a134f0b68263a1166fa553ba6b46e60549c5 Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Fri, 16 Apr 2021 16:59:00 +0200 Subject: [PATCH 5/8] python as base image --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6746701bc..ac7da975e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM ubuntu:18.04 + +FROM python:alpine3.13 ENV MOTD="Welcome to our Docker Syncplay server!" ENV PORT=8999 ENV PASSWORD="changethis" ENV SALT="changethis" -RUN apt update -RUN apt-get install -y make python3 python3-twisted python3-pyside +RUN apk update && apk add make +#RUN apt update +#RUN apt-get install -y make python3 python3-twisted python3-pyside COPY . /syncplay RUN cd syncplay && make install From 2f243e328271a287eed25178cc308c7905af4576 Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Fri, 16 Apr 2021 17:43:02 +0200 Subject: [PATCH 6/8] better Dockerfile --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac7da975e..42805d1f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,16 @@ - -FROM python:alpine3.13 +FROM ubuntu:18.04 ENV MOTD="Welcome to our Docker Syncplay server!" ENV PORT=8999 ENV PASSWORD="changethis" ENV SALT="changethis" -RUN apk update && apk add make -#RUN apt update -#RUN apt-get install -y make python3 python3-twisted python3-pyside +RUN apt update && apt-get install -y make python3 python3-twisted COPY . /syncplay -RUN cd syncplay && make install +WORKDIR syncplay + +RUN make install EXPOSE $PORT From d489ed46c976f7ea529addc050c4a8c1d6e17747 Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Thu, 13 May 2021 19:05:01 +0200 Subject: [PATCH 7/8] Added HEALTHCHECK --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 42805d1f4..8d53fd614 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,7 @@ RUN make install EXPOSE $PORT +RUN apt-get install -y net-tools +HEALTHCHECK CMD netstat -tulpn | grep 8999 || exit 1 + CMD echo $MOTD > motd.txt && syncplay-server --password $PASSWORD --port $PORT --salt $SALT --motd-file motd.txt From bf6122d59ca526dfcda80d5c173d2e5e5f2c1e1b Mon Sep 17 00:00:00 2001 From: Yatima Santamorena Date: Thu, 13 May 2021 19:17:53 +0200 Subject: [PATCH 8/8] PORT in HEALTHCHECK --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8d53fd614..b96bd1780 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,6 @@ RUN make install EXPOSE $PORT RUN apt-get install -y net-tools -HEALTHCHECK CMD netstat -tulpn | grep 8999 || exit 1 +HEALTHCHECK CMD netstat -tulpn | grep $PORT || exit 1 CMD echo $MOTD > motd.txt && syncplay-server --password $PASSWORD --port $PORT --salt $SALT --motd-file motd.txt