docker file compatible with ray version

pull/2531/head
vcptr 2019-11-02 13:38:29 +08:00 committed by Nicholas Wang
parent 4684e07b14
commit 26fd271f66
No known key found for this signature in database
GPG Key ID: F20CA399C9BD9100
1 changed files with 9 additions and 3 deletions

View File

@ -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 <admin@v2fly.org>"
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"]