更新 DockerfileSlim
This commit is contained in:
parent
58131f934f
commit
d151a87c5d
@ -1,22 +1,18 @@
|
|||||||
FROM testhub.szjixun.cn:9043/public/golang:1.20-alpine AS builder
|
FROM busybox:glibc
|
||||||
|
|
||||||
LABEL stage=gobuilder
|
COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||||
ENV CGO_ENABLED 0
|
COPY ./docs/certs /etc/ssl/certs
|
||||||
ENV GOPROXY https://goproxy.cn,direct
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||||
WORKDIR /build
|
|
||||||
COPY micro-bundle /app/micro-bundle
|
|
||||||
|
|
||||||
#FROM 172.16.100.99:9006/alpine
|
#ENV TZ Asia/Shanghai
|
||||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
ARG GIT_COMMIT=default_value
|
||||||
#RUN apk update --no-cache
|
ENV GIT_COMMIT=$GIT_COMMIT
|
||||||
#RUN apk add --no-cache ca-certificates
|
|
||||||
#RUN apk add --no-cache tzdata
|
|
||||||
FROM testhub.szjixun.cn:9043/public/self-alpine
|
|
||||||
COPY ./conf /app/conf
|
|
||||||
|
|
||||||
ENV TZ Asia/Shanghai
|
WORKDIR /app/main-client
|
||||||
ENV MODE_ENV k8stest
|
#通过名称引用
|
||||||
WORKDIR /app
|
COPY ./build/app ./bin/mainServer
|
||||||
COPY --from=builder /app/micro-bundle .
|
COPY ./conf/ /app/conf/
|
||||||
EXPOSE 20118
|
COPY ./conf/ ./conf/
|
||||||
CMD ["/app/micro-bundle"]
|
|
||||||
|
WORKDIR /app/main-client/bin
|
||||||
|
CMD ["./mainServer"]
|
Loading…
Reference in New Issue
Block a user