diff --git a/Dockerfile b/Dockerfile index 2115d50..6930caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"