|
@@ -14,17 +14,17 @@ RUN go mod download |
|
@@ -14,17 +14,17 @@ RUN go mod download |
14
|
|
14
|
|
15
|
COPY . .
|
15
|
COPY . .
|
16
|
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
|
16
|
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
|
17
|
-EXPOSE 8080
|
|
|
18
|
-CMD ["./opp"]
|
17
|
+#EXPOSE 8080
|
|
|
18
|
+#CMD ["./opp"]
|
19
|
|
19
|
|
20
|
-#FROM alpine:latest
|
20
|
+FROM alpine:latest
|
21
|
|
21
|
|
22
|
-#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
|
23
|
-#RUN apk add --no-cache tzdata \
|
|
|
24
|
-# && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
25
|
-# && echo "Asia/Shanghai" > /etc/timezone \
|
|
|
26
|
-## && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
|
|
|
27
|
-#WORKDIR /root/
|
|
|
28
|
-#COPY --from=builder /go/src/opp .
|
|
|
29
|
-#EXPOSE 8080
|
|
|
30
|
-#CMD ["./opp"] |
|
|
|
|
22
|
+RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
|
23
|
+RUN apk add --no-cache tzdata \
|
|
|
24
|
+ && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
25
|
+ && echo "Asia/Shanghai" > /etc/timezone \
|
|
|
26
|
+# && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
|
|
|
27
|
+WORKDIR /root/
|
|
|
28
|
+COPY --from=builder /go/src/opp .
|
|
|
29
|
+EXPOSE 8080
|
|
|
30
|
+CMD ["./opp"] |