Docker-ify?
This commit is contained in:
parent
44df2533c8
commit
a4b34d4943
2 changed files with 25 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM golang:1.22.0 as build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /go/bin/app
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/base-debian12
|
||||||
|
|
||||||
|
COPY --from=build /go/bin/app /
|
||||||
|
|
||||||
|
CMD [ "/app" ]
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: your-app-image:latest
|
||||||
|
command: ["/app"]
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
Loading…
Add table
Reference in a new issue