zhou20120904 commited on
Commit
737d641
·
1 Parent(s): 6f5c4c1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ############################
2
+ # STEP 1 build executable binary
3
+ ############################
4
+ FROM golang:alpine AS builder
5
+
6
+ RUN apk update && apk add --no-cache git bash wget curl
7
+ WORKDIR /build
8
+ RUN git clone --progress https://github.com/v2fly/v2ray-core.git . && \
9
+ bash ./release/user-package.sh nosource noconf codename=$(git describe --abbrev=0 --tags) buildname=docker-fly abpathtgz=/tmp/v2ray.tgz
10
+
11
+ ############################
12
+ # STEP 2 build a small image
13
+ ############################
14
+ FROM alpine
15
+
16
+ LABEL maintainer "V2Fly Community <[email protected]>"
17
+ COPY --from=builder /tmp/v2ray.tgz /tmp
18
+ RUN apk update && apk add ca-certificates && \
19
+ mkdir -p /usr/bin/v2ray && \
20
+ tar xvfz /tmp/v2ray.tgz -C /usr/bin/v2ray
21
+
22
+ #ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
23
+ ENV PATH /usr/bin/v2ray:$PATH
24
+ CMD ["v2ray", "-config=/etc/v2ray/config.json"]