Compare commits
2 Commits
aeae478a68
...
b53ce13905
| Author | SHA1 | Date | |
|---|---|---|---|
| b53ce13905 | |||
| 127299d64d |
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM golang:1.25 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libc6-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=1 go build -ldflags="-linkmode external -extldflags '-static' -s -w" -o podcaster .
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/podcaster /podcaster
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENTRYPOINT ["/podcaster"]
|
||||
5
Justfile
Normal file
5
Justfile
Normal file
@@ -0,0 +1,5 @@
|
||||
build:
|
||||
docker build -t podcaster .
|
||||
|
||||
run:
|
||||
docker run -p 5000:5000 --name podcaster -v ./db:/db -v ./podcasts:/podcasts podcaster:latest
|
||||
Reference in New Issue
Block a user