feat: 🎉 初步文件确定

This commit is contained in:
loveuer
2024-03-19 14:12:40 +08:00
commit d3c87d0f8e
8 changed files with 2745 additions and 0 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM golang:1.20.14-alpine3.19 AS builder
WORKDIR /app/build
COPY go.mod .
COPY go.sum .
COPY main.go .
ENV GOPROXY https://goproxy.io
RUN go mod download && go build -ldflags='-s -w' -o hello_app .
FROM alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && apk add curl
ENV TZ Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/build/hello_app .
CMD [ "/app/hello_app" ]