...
|
...
|
@@ -15,13 +15,13 @@ COPY . . |
|
|
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o opp main.go
|
|
|
|
|
|
#FROM alpine:latest
|
|
|
#FROM 192.168.0.243:5000/mmm/mmmopp:20200110
|
|
|
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
|
|
# && apk add --no-cache tzdata \
|
|
|
# && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
# && echo "Asia/Shanghai" > /etc/timezone \
|
|
|
# && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
|
|
|
#WORKDIR /root/
|
|
|
#COPY --from=builder /go/src/opp .
|
|
|
FROM 192.168.0.243:5000/mmm/mmmopp:20200110
|
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
|
|
&& apk add --no-cache tzdata \
|
|
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
|
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
|
|
|
WORKDIR /root/
|
|
|
COPY --from=builder /go/src/opp .
|
|
|
EXPOSE 8080
|
|
|
CMD ["./opp"] |
|
|
\ No newline at end of file |
...
|
...
|
|