1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-09 09:20:45 +00:00
v2fly/Dockerfile

25 lines
841 B
Docker
Raw Normal View History

2019-10-31 03:20:06 +00:00
############################
# STEP 1 build executable binary
############################
FROM golang:alpine AS builder
2020-10-07 08:28:51 +00:00
RUN apk update && apk add --no-cache git bash wget curl
2020-10-07 08:28:51 +00:00
WORKDIR /build
RUN git clone --progress https://github.com/v2fly/v2ray-core.git . && \
2020-10-07 08:28:51 +00:00
bash ./release/user-package.sh nosource noconf codename=$(git describe --abbrev=0 --tags) buildname=docker-fly abpathtgz=/tmp/v2ray.tgz
2019-10-31 03:20:06 +00:00
############################
# STEP 2 build a small image
############################
FROM alpine
LABEL maintainer "V2Fly Community <admin@v2fly.org>"
2019-10-31 03:20:06 +00: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
#ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
ENV PATH /usr/bin/v2ray:$PATH
CMD ["v2ray", "-config=/etc/v2ray/config.json"]