Initial commit
This commit is contained in:
commit
1cc55d91ef
7 changed files with 912 additions and 0 deletions
20
internal/Dockerfile
Normal file
20
internal/Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# ── Build stage ──────────────────────────────────────────────────────────────
|
||||
FROM golang:1.22-alpine AS builder
|
||||
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /isosilo .
|
||||
|
||||
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /isosilo /isosilo
|
||||
|
||||
# ISOs should be mounted here at runtime.
|
||||
VOLUME ["/isos"]
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/isosilo", "-dir", "/isos", "-addr", ":8080"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue