feat: statefulsets
This commit is contained in:
23
service/echo/Dockerfile
Normal file
23
service/echo/Dockerfile
Normal 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" ]
|
Reference in New Issue
Block a user