feat: statefulsets

This commit is contained in:
loveuer
2024-04-03 14:02:28 +08:00
parent cd4df6ce5f
commit 4ae56d1726
7 changed files with 213 additions and 1 deletions

23
service/echo/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 service/echo/main.go .
ENV GOPROXY https://goproxy.io
RUN go mod download && go build -ldflags='-s -w' -o echo_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/echo_app .
CMD [ "/app/echo_app" ]