From 3994f02a297d1e74790aa6b76a86b5f0d8a6e9f5 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Fri, 3 Jul 2020 15:03:10 +0900 Subject: [PATCH] Update Dockerfile --- docker/trojan/Dockerfile | 4 ++-- docker/trojan/Dockerfile.architecture | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/trojan/Dockerfile b/docker/trojan/Dockerfile index 8cc587d..a6ef3c2 100644 --- a/docker/trojan/Dockerfile +++ b/docker/trojan/Dockerfile @@ -7,7 +7,7 @@ FROM alpine:latest AS builder WORKDIR /root RUN set -ex \ - && VERSION="v1.16.0" \ + && VERSION="$(wget --no-check-certificate -qO- https://api.github.com/repos/trojan-gfw/trojan/tags | grep 'name' | cut -d\" -f4 | head -1)" \ && apk add --no-cache git build-base make cmake boost-dev openssl-dev mariadb-connector-c-dev \ && git clone --branch ${VERSION} --single-branch https://github.com/trojan-gfw/trojan.git \ && cd trojan \ @@ -25,4 +25,4 @@ COPY --from=builder /root/trojan/trojan /usr/bin COPY config.json /etc/trojan/config.json VOLUME /etc/trojan ENV TZ=Asia/Shanghai -CMD [ "trojan", "-c", "/etc/trojan/config.json" ] +CMD [ "/usr/bin/trojan", "-c", "/etc/trojan/config.json" ] diff --git a/docker/trojan/Dockerfile.architecture b/docker/trojan/Dockerfile.architecture index 0f562d1..1507f19 100644 --- a/docker/trojan/Dockerfile.architecture +++ b/docker/trojan/Dockerfile.architecture @@ -7,7 +7,7 @@ FROM --platform=${TARGETPLATFORM} alpine:latest AS builder WORKDIR /root RUN set -ex \ - && VERSION="v1.16.0" \ + && VERSION="$(wget --no-check-certificate -qO- https://api.github.com/repos/trojan-gfw/trojan/tags | grep 'name' | cut -d\" -f4 | head -1)" \ && apk add --no-cache git build-base make cmake boost-dev openssl-dev mariadb-connector-c-dev \ && git clone --branch ${VERSION} --single-branch https://github.com/trojan-gfw/trojan.git \ && cd trojan \ @@ -25,4 +25,4 @@ COPY --from=builder /root/trojan/trojan /usr/bin COPY config.json /etc/trojan/config.json VOLUME /etc/trojan ENV TZ=Asia/Shanghai -CMD [ "trojan", "-c", "/etc/trojan/config.json" ] +CMD [ "/usr/bin/trojan", "-c", "/etc/trojan/config.json" ]