Switch to debian:trixie-slim image

This commit is contained in:
2026-05-23 23:16:05 -07:00
parent 424f83ed94
commit 574d3111bc

View File

@@ -1,44 +1,39 @@
# build
FROM alpine:3 as build
WORKDIR /usr/src/app
RUN apk update && apk upgrade && apk add \
linux-headers \
git \
clang18 \
make \
sqlite-dev
COPY src ./src
COPY vendor ./vendor
COPY .git ./.git
COPY Makefile CMakeLists.txt version.h.in ./
RUN sed -i 's/^CC=clang$/&-18/' Makefile
RUN sed -i 's/^CXX=clang++$/&-18/' Makefile
RUN make nosandbox -j$(nproc)
# export-only stage: `docker build --target=export --output=./bin .`
FROM scratch AS export
COPY --from=build /usr/src/app/bin/fusion /fusion
# prod
FROM alpine:3
WORKDIR /usr/src/app
RUN apk update && apk upgrade && apk add \
libstdc++ \
sqlite-dev
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
CMD ["/bin/fusion"]
EXPOSE 23000/tcp
EXPOSE 23001/tcp
EXPOSE 8003/tcp
LABEL Name=openfusion Version=2.0.0
# build
FROM debian:trixie-slim as build
WORKDIR /usr/src/app
RUN apt update && apt upgrade -y && apt install -y \
git \
clang \
build-essential \
libsqlite3-dev
COPY src ./src
COPY vendor ./vendor
COPY .git ./.git
COPY Makefile CMakeLists.txt version.h.in ./
RUN make nosandbox -j$(nproc)
# export-only stage: `docker build --target=export --output=./bin .`
FROM scratch AS export
COPY --from=build /usr/src/app/bin/fusion /fusion
# prod
FROM debian:trixie-slim
WORKDIR /usr/src/app
RUN apt update && apt upgrade -y && apt install -y \
libsqlite3-dev
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
CMD ["/bin/fusion"]
EXPOSE 23000/tcp
EXPOSE 23001/tcp
EXPOSE 8003/tcp
LABEL Name=openfusion Version=2.0.0