From 022b51aaaf5124d832d76597d86ec49f70aebc9b Mon Sep 17 00:00:00 2001 From: gotoeasy Date: Sat, 24 Sep 2022 12:24:26 +0800 Subject: [PATCH] 0.7.0 --- .gitignore | 1 + glc/Dockerfile | 44 -------------------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 glc/Dockerfile diff --git a/.gitignore b/.gitignore index 915f72e..4101bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /**/dist/ /**/node_modules/ /glc/glc +/glc/Dockerfile diff --git a/glc/Dockerfile b/glc/Dockerfile deleted file mode 100644 index b8449ae..0000000 --- a/glc/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -# ---------------------------- -# 编译Web -# ---------------------------- -FROM node:14-alpine3.15 AS webbuilder - -WORKDIR /webproject -COPY . /webproject - -RUN cd www/web && \ - yarn install --registry https://registry.npm.taobao.org && \ - yarn run build - - -# ---------------------------- -# 编译Go -# ---------------------------- -FROM golang:1.19-alpine AS gobuilder - -WORKDIR /goproject -COPY . /goproject - -COPY --from=webbuilder /webproject/www/web/dist www/web/ - -ENV GOPROXY https://goproxy.cn,direct -RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-w -s" - - -# ---------------------------- -# 打包镜像 -# ---------------------------- -FROM alpine AS runner -MAINTAINER gotoeasy - -COPY --from=gobuilder /goproject/glc /usr/local/bin/ - -# 安装bash、设定默认时区 -RUN alpine_version=`cat /etc/issue | head -1 | awk '{print $5}'` \ - && echo "https://mirrors.aliyun.com/alpine/v${alpine_version}/main/" > /etc/apk/repositories \ - && apk update && apk upgrade && apk add --no-cache bash bash-doc bash-completion tzdata \ - && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone \ - && rm -rf /var/cache/apk/* - -EXPOSE 8080 -ENTRYPOINT ["glc"]