반응형
FROM golang:latest AS builder
RUN mkdir /app
ADD . /app
WORKDIR /app
RUN CGO_ENABLED=0 GOOS=linux go build -o app cmd/server/main.go
FROM alpine:latest AS prod
RUN mkdir /app
WORKDIR /app
COPY --from=builder /app/app .
CMD [ "./app" ]
반응형
'Dev > Go' 카테고리의 다른 글
go - package (0) | 2023.11.24 |
---|---|
go module upgrade (0) | 2023.11.13 |
golang fiber + otel + recover middleware 호출 순서 (0) | 2023.11.10 |
golang gorm MySQL TIME data type (0) | 2023.10.19 |
Visual studio code (vscode) Go (golang) 개발 환경 설정 (0) | 2023.09.10 |