40 lines
1.7 KiB
Docker
40 lines
1.7 KiB
Docker
FROM docker.io/node:22 AS build-ember
|
|
# TODO: Implement ember frontend build
|
|
COPY . /app
|
|
WORKDIR /app/frontend-reactive
|
|
RUN npm install && npm run build
|
|
|
|
FROM docker.io/golang:1.23 AS build-go
|
|
# TODO: Implement golang build
|
|
|
|
COPY --from=build-ember /app /app
|
|
WORKDIR /app
|
|
RUN CGO_ENABLED=0 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
|
|
|
|
ENTRYPOINT ["/linstrom"]
|
|
|
|
# OCI labels, following https://github.com/opencontainers/image-spec/blob/main/annotations.md
|
|
|
|
# Make this one dynamic
|
|
# LABEL org.opencontainers.image.created = rfc timestamp, according to https://datatracker.ietf.org/doc/html/rfc3339#section-5.6
|
|
LABEL org.opencontainers.image.authors="Melody Becker/m*"
|
|
# LABEL org.opencontainers.image.url="Main linstrom page url here"
|
|
# LABEL org.opencontainers.image.documentation="Url to main linstrom documentation here"
|
|
LABEL org.opencontainers.image.source="https://git.mstar.dev/mstar/linstrom"
|
|
# Make this one dynamic from build tag
|
|
LABEL org.opencontainers.image.version="0.0.1"
|
|
# LABEL org.opencontainers.image.revision="idk what"
|
|
# LABEL org.opencontainers.image.vendor="None/m*"
|
|
LABEL org.opencontainers.image.licenses="EUPL-1.2"
|
|
# LABEL org.opencontainers.image.ref.name="uhh, no idea either"
|
|
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"
|