×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Ming Yun
Added: Oct 28, 2021 10:55 AM
Views: 2195
Tags: docker
  1. FROM golang:1.15-alpine
  2.  
  3. COPY --from=0 /usr/local/go/lib/time/zoneinfo.zip /opt/zoneinfo.zip
  4. ENV ZONEINFO /opt/zoneinfo.zip
  5.  
  6. ##
  7. RUN apk update && apk add curl bash tree tzdata \
  8.     && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  9.     && echo "Asia/Shanghai" > /etc/timezone
  10.  
  11. WORKDIR /app
  12. ADD service .
  13. ADD conf/config.yaml conf/config.yaml
  14. ENV GIN_MODE=release
  15.  
  16. EXPOSE 80
  17. ENTRYPOINT ["./service"]