mirror of
https://github.com/elyby/accounts-profiles-endpoint.git
synced 2024-11-26 00:38:54 +05:30
22 lines
326 B
Docker
22 lines
326 B
Docker
|
# syntax=docker/dockerfile:1
|
||
|
|
||
|
FROM golang:1.21 AS builder
|
||
|
|
||
|
COPY . /build
|
||
|
WORKDIR /build
|
||
|
RUN go mod download
|
||
|
|
||
|
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
|
||
|
go build \
|
||
|
-trimpath \
|
||
|
-ldflags="-w -s" \
|
||
|
-o app \
|
||
|
main.go
|
||
|
|
||
|
FROM scratch
|
||
|
|
||
|
COPY --from=builder /build/app /root/app
|
||
|
|
||
|
ENTRYPOINT ["/root/app"]
|
||
|
EXPOSE 8080
|