This commit is contained in:
parent
db16e49d46
commit
ea57b2f489
2 changed files with 27 additions and 0 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.gitignore
|
||||
.idea
|
||||
.mockery.yaml
|
||||
config.env
|
||||
gen-swag.sh
|
||||
merch.sql
|
||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM golang:1.26.1-alpine3.23 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o main "./cmd"
|
||||
|
||||
|
||||
FROM alpine:3.23
|
||||
|
||||
RUN apk add --no-cache \
|
||||
tzdata \
|
||||
ca-certificates
|
||||
|
||||
COPY --from=builder /app/main /usr/local/bin/app
|
||||
|
||||
|
||||
RUN chmod +x /usr/local/bin/app
|
||||
|
||||
ENTRYPOINT ["app"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue