2019-10-30 23:20:06 -04:00
|
|
|
############################
|
|
|
|
# STEP 1 build executable binary
|
|
|
|
############################
|
|
|
|
FROM golang:alpine AS builder
|
2020-07-22 07:20:24 -04:00
|
|
|
RUN apk update && apk add --no-cache git bash wget curl
|
2019-10-30 23:20:06 -04:00
|
|
|
WORKDIR /go/src/v2ray.com/core
|
2019-11-02 01:38:29 -04:00
|
|
|
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
|
2019-10-30 23:20:06 -04:00
|
|
|
############################
|
|
|
|
# STEP 2 build a small image
|
|
|
|
############################
|
|
|
|
FROM alpine
|
2019-11-02 01:38:29 -04:00
|
|
|
|
|
|
|
LABEL maintainer "V2Fly Community <admin@v2fly.org>"
|
2019-10-30 23:20:06 -04:00
|
|
|
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
|
2019-11-02 01:38:29 -04:00
|
|
|
|
|
|
|
#ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
|
|
|
|
ENV PATH /usr/bin/v2ray:$PATH
|
|
|
|
CMD ["v2ray", "-config=/etc/v2ray/config.json"]
|
|
|
|
|