🎨 修改dockerfile
This commit is contained in:
parent
1bd7ead544
commit
e32cce111d
@ -1,4 +1,4 @@
|
|||||||
FROM golang:alpine as builder
|
FROM registry.cn-hangzhou.aliyuncs.com/hyxc/golang:alpine-1.18 as builder
|
||||||
|
|
||||||
WORKDIR /go/src/miniapp
|
WORKDIR /go/src/miniapp
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -10,7 +10,7 @@ RUN go env -w GO111MODULE=on \
|
|||||||
&& go mod tidy \
|
&& go mod tidy \
|
||||||
&& go build -o server .
|
&& go build -o server .
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM registry.cn-hangzhou.aliyuncs.com/hyxc/alpine:3.13.6 as runner
|
||||||
WORKDIR /go/src/miniapp
|
WORKDIR /go/src/miniapp
|
||||||
|
|
||||||
COPY --from=0 /go/src/miniapp/server ./
|
COPY --from=0 /go/src/miniapp/server ./
|
||||||
@ -18,5 +18,7 @@ COPY --from=0 /go/src/miniapp/resource ./resource/
|
|||||||
COPY --from=0 /go/src/miniapp/docker/config.docker.yaml ./docker/
|
COPY --from=0 /go/src/miniapp/docker/config.docker.yaml ./docker/
|
||||||
COPY --from=0 /go/src/miniapp/docker ./
|
COPY --from=0 /go/src/miniapp/docker ./
|
||||||
|
|
||||||
|
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo "Asia/Shanghai" > /etc/timezone
|
||||||
|
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
ENTRYPOINT ./server -c docker/config.docker.yaml
|
ENTRYPOINT ./server -c docker/config.docker.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user