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.

26 lines
618 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
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. wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \
  10. rm -rf /usr/local/go && \
  11. tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \
  12. rm -rf *.tar.gz && \
  13. go version && go env;
  14. WORKDIR $GOPATH
  15. COPY . ginvue
  16. RUN cd ginvue && go build -o app;
  17. COPY ./config.yaml $GOPATH/ginvue/
  18. EXPOSE 8888
  19. CMD ["ginvue/app"]