You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
645 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. FROM centos:7.6.1810
  2. # 设置go mod proxy 国内代理
  3. # 设置golang path
  4. ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin"
  5. # 定义使用的Golang 版本
  6. ARG GO_VERSION=1.13.3
  7. # 安装 golang 1.13.3
  8. RUN yum install -y wget && \
  9. yum install -y wqy-microhei-fonts wqy-zenhei-fonts && \
  10. wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \
  11. rm -rf /usr/local/go && \
  12. tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \
  13. rm -rf *.tar.gz && \
  14. go version && go env;
  15. WORKDIR $GOPATH
  16. COPY . gin-vue
  17. RUN cd gin-vue && go build -o app;
  18. EXPOSE 8888
  19. CMD ["gin-vue/app"]