Browse Source

Refine Dockerfile (#274)

Loyalsoldier 5 years ago
parent
commit
26aecf095f
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -2,10 +2,12 @@
 # STEP 1 build executable binary
 # STEP 1 build executable binary
 ############################
 ############################
 FROM golang:alpine AS builder
 FROM golang:alpine AS builder
+
 RUN apk update && apk add --no-cache git bash wget curl
 RUN apk update && apk add --no-cache git bash wget curl
-WORKDIR /go/src/v2ray.com/core
+WORKDIR /build
 RUN git clone --progress https://github.com/v2fly/v2ray-core.git . && \
 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
+    bash ./release/user-package.sh nosource noconf codename=$(git describe --abbrev=0 --tags) buildname=docker-fly abpathtgz=/tmp/v2ray.tgz
+
 ############################
 ############################
 # STEP 2 build a small image
 # STEP 2 build a small image
 ############################
 ############################
@@ -20,4 +22,3 @@ RUN apk update && apk add ca-certificates && \
 #ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
 #ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
 ENV PATH /usr/bin/v2ray:$PATH
 ENV PATH /usr/bin/v2ray:$PATH
 CMD ["v2ray", "-config=/etc/v2ray/config.json"]
 CMD ["v2ray", "-config=/etc/v2ray/config.json"]
-