更新 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
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
WORKDIR /build
|
||||
COPY micro-bundle /app/micro-bundle
|
||||
COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||
COPY ./docs/certs /etc/ssl/certs
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
|
||||
#FROM 172.16.100.99:9006/alpine
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache
|
||||
#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
|
||||
ARG GIT_COMMIT=default_value
|
||||
ENV GIT_COMMIT=$GIT_COMMIT
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV MODE_ENV k8stest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/micro-bundle .
|
||||
EXPOSE 20118
|
||||
CMD ["/app/micro-bundle"]
|
||||
WORKDIR /app/main-client
|
||||
#通过名称引用
|
||||
COPY ./build/app ./bin/mainServer
|
||||
COPY ./conf/ /app/conf/
|
||||
COPY ./conf/ ./conf/
|
||||
|
||||
WORKDIR /app/main-client/bin
|
||||
CMD ["./mainServer"]
|
Loading…
Reference in New Issue
Block a user