Update dockerfile
Some checks failed
/ docker (push) Failing after 28s

- Remove entire frontend build stage since not needed anymore until
  backend is good enough
- Hopefully help with caching dependencies for the go build
This commit is contained in:
Melody Becker 2025-06-11 16:00:43 +02:00
parent 27b7d342b7
commit 715cfde459
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI

View file

@ -1,21 +1,15 @@
FROM docker.io/node:22 AS build-ember
# TODO: Implement ember frontend build
COPY . /app
WORKDIR /app/frontend-reactive
RUN npm install
RUN npm run build
# TODO: Add build for frontend here
FROM docker.io/golang:1.24 AS build-go
# TODO: Implement golang build
COPY --from=build-ember /app /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
WORKDIR /app
RUN GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go get
COPY . /app
RUN CGO_ENABLED=0 GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go build -o /app/linstrom .
# FROM fedora:latest AS release
FROM alpine:3 AS release
# TODO: Implement final release container
COPY --from=build-go /app/linstrom /linstrom
@ -39,4 +33,4 @@ LABEL org.opencontainers.image.title="Linstrom"
LABEL org.opencontainers.image.description="A social media server acting as part of the fediverse"
# Make this automatic since latest distroless image gets update constantly
# LABEL org.opencontainers.image.base.digest="digest/hash of base image"
LABEL org.opencontainers.image.base.name="gcr.io/distroless/static-debian12:latest"
LABEL org.opencontainers.image.base.name="scratch"