1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 09:26:21 -05:00
v2fly/Dockerfile

18 lines
662 B
Docker
Raw Normal View History

2019-10-30 23:20:06 -04:00
############################
# STEP 1 build executable binary
############################
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git bash wget
WORKDIR /go/src/v2ray.com/core
2019-10-30 23:44:57 -04:00
RUN git clone --progress --depth=1 https://github.com/v2fly/v2ray-core.git . && \
bash ./release/user-package.sh nosource noconf abpathtgz=/tmp/v2ray.tgz
2019-10-30 23:20:06 -04:00
############################
# STEP 2 build a small image
############################
FROM alpine
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"]