23 lines
303 B
Docker
23 lines
303 B
Docker
FROM golang:1.25.1-alpine3.22 AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
COPY go.* ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o app ./cmd
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN mkdir -p /home && \
|
|
apk --no-cache add curl
|
|
|
|
COPY --from=builder /build/app /home/app
|
|
|
|
EXPOSE 9050
|
|
|
|
CMD ["./home/app"]
|