- 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:
parent
27b7d342b7
commit
715cfde459
1 changed files with 6 additions and 12 deletions
18
Dockerfile
18
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue