From f82cc0c2a3f28a9d816248737dbf454608ffe544 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sat, 11 Aug 2018 20:46:52 +0900 Subject: [PATCH] Update Dockerfile Signed-off-by: Teddysun --- docker/kms/Dockerfile | 35 +++++++++++++++++++---------------- docker/l2tp/Dockerfile | 16 ++++++++-------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/docker/kms/Dockerfile b/docker/kms/Dockerfile index ba8b6a4..bb7ebf7 100644 --- a/docker/kms/Dockerfile +++ b/docker/kms/Dockerfile @@ -8,22 +8,25 @@ MAINTAINER Teddysun ENV KMS_RELEASE https://github.com/Wind4/vlmcsd/archive/master.zip -RUN apk add --no-cache --virtual .build-deps \ - g++ \ - gcc \ - wget \ - make \ - unzip \ - && cd /tmp \ - && wget -O vlmcsd.zip $KMS_RELEASE \ - && unzip vlmcsd.zip \ - && cd vlmcsd-master \ - && make \ - && cp -p bin/vlmcsd /usr/bin/ \ - && chmod 755 /usr/bin/vlmcsd \ - && rm -rf /tmp/vlmcsd.zip /tmp/vlmcsd-master \ - && apk del .build-deps +RUN runDeps="\ + g++ \ + gcc \ + wget \ + make \ + unzip \ + "; \ + set -ex \ + && apk add --no-cache --virtual .build-deps ${runDeps} \ + && cd /tmp \ + && wget -O vlmcsd.zip ${KMS_RELEASE} \ + && unzip vlmcsd.zip \ + && cd vlmcsd-master \ + && make \ + && cp -p bin/vlmcsd /usr/bin/ \ + && chmod 755 /usr/bin/vlmcsd \ + && rm -rf /tmp/vlmcsd.zip /tmp/vlmcsd-master \ + && apk del .build-deps EXPOSE 1688 -CMD [ "/usr/bin/vlmcsd", "-D" ] +CMD [ "vlmcsd", "-D" ] diff --git a/docker/l2tp/Dockerfile b/docker/l2tp/Dockerfile index b541d31..b4b9b07 100644 --- a/docker/l2tp/Dockerfile +++ b/docker/l2tp/Dockerfile @@ -5,13 +5,13 @@ FROM debian:stretch LABEL maintainer="Teddysun " RUN set -ex \ - && printf "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list \ - && apt-get update \ - && apt-get -t sid install -y --no-install-recommends libreswan xl2tpd \ - && apt-get install -y --no-install-recommends wget iproute2 openssl ca-certificates kmod net-tools iptables \ - && apt-get -y autoremove \ - && apt-get -y clean \ - && rm -rf /var/lib/apt/lists/* + && printf "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list \ + && apt-get update \ + && apt-get -t sid install -y --no-install-recommends libreswan xl2tpd \ + && apt-get install -y --no-install-recommends wget iproute2 openssl ca-certificates kmod net-tools iptables \ + && apt-get -y autoremove \ + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/* COPY ./ipsec /etc/init.d/ipsec COPY ./l2tp.sh /usr/bin/l2tp @@ -22,4 +22,4 @@ VOLUME /lib/modules EXPOSE 500/udp 4500/udp -CMD [ "/usr/bin/l2tp" ] +CMD [ "l2tp" ]