From 26fd271f66b2ee6cf92de30ab2e3a8868ea30528 Mon Sep 17 00:00:00 2001 From: vcptr <51714622+vcptr@users.noreply.github.com> Date: Sat, 2 Nov 2019 13:38:29 +0800 Subject: [PATCH] docker file compatible with ray version --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index add2f8e4..bff3dfe8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,20 @@ FROM golang:alpine AS builder RUN apk update && apk add --no-cache git bash wget WORKDIR /go/src/v2ray.com/core -RUN git clone --progress --depth=1 https://github.com/v2fly/v2ray-core.git . && \ - bash ./release/user-package.sh nosource noconf codename=docker-fly abpathtgz=/tmp/v2ray.tgz +RUN git clone --progress https://github.com/v2fly/v2ray-core.git . && \ + bash ./release/user-package.sh nosource noconf codename=$(git describe --tags) buildname=docker-fly abpathtgz=/tmp/v2ray.tgz ############################ # STEP 2 build a small image ############################ FROM alpine + +LABEL maintainer "V2Fly Community " COPY --from=builder /tmp/v2ray.tgz /tmp RUN apk update && apk add ca-certificates && \ mkdir -p /usr/bin/v2ray && \ tar xvfz /tmp/v2ray.tgz -C /usr/bin/v2ray -ENTRYPOINT ["/usr/bin/v2ray/v2ray"] + +#ENTRYPOINT ["/usr/bin/v2ray/v2ray"] +ENV PATH /usr/bin/v2ray:$PATH +CMD ["v2ray", "-config=/etc/v2ray/config.json"] +