Skip to content

Commit

Permalink
use slim image for build stage and specify all labels on one line wit…
Browse files Browse the repository at this point in the history
…h '\'s
  • Loading branch information
nam20485 committed Feb 15, 2024
1 parent 0f539c4 commit b9049a9
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM debian:bookworm-20240211@sha256:4482958b4461ff7d9fabc24b3a9ab1e9a2c85ece07b2db1840c7cbc01d053e90 AS build
LABEL org.opencontainers.image.source=https://github.com/nam20485/OdbDesign
LABEL org.opencontainers.image.authors=https://github.com/nam20485
LABEL org.opencontainers.image.description="The OdbDesign Docker image runs the OdbDesignServer REST API server executable, listening on port 8888."
LABEL org.opencontainers.image.licenses=MIT
#FROM debian:bookworm-20240211@sha256:4482958b4461ff7d9fabc24b3a9ab1e9a2c85ece07b2db1840c7cbc01d053e90 AS build
FROM debian:bookworm-20240211-slim@sha256:d02c76d82364cedca16ba3ed6f9102406fa9fa8833076a609cabf14270f43dfc AS build

ARG OWNER=nam20485
ARG GITHUB_TOKEN="PASSWORD"
Expand Down Expand Up @@ -72,11 +69,12 @@ RUN cmake --build --preset linux-release
# RUN cmake --build --preset linux-debug

# much smaller runtime image
FROM debian:bookworm-20240211-slim@sha256:d02c76d82364cedca16ba3ed6f9102406fa9fa8833076a609cabf14270f43dfc AS run
LABEL org.opencontainers.image.source=https://github.com/nam20485/OdbDesign
LABEL org.opencontainers.image.authors=https://github.com/nam20485
LABEL org.opencontainers.image.description="The OdbDesign Docker image runs the OdbDesignServer REST API server executable, listening on port 8888."
LABEL org.opencontainers.image.licenses=MIT
#FROM debian:bookworm-20240211-slim@sha256:d02c76d82364cedca16ba3ed6f9102406fa9fa8833076a609cabf14270f43dfc AS run
FROM debian:bookworm-20240211@sha256:4482958b4461ff7d9fabc24b3a9ab1e9a2c85ece07b2db1840c7cbc01d053e90 as run
LABEL org.opencontainers.image.source=https://github.com/nam20485/OdbDesign \
org.opencontainers.image.authors=https://github.com/nam20485 \
org.opencontainers.image.description="The OdbDesign Docker image runs the OdbDesignServer REST API server executable, listening on port 8888." \
org.opencontainers.image.licenses=MIT
EXPOSE 8888

RUN mkdir --parents /OdbDesign/bin
Expand Down

0 comments on commit b9049a9

Please sign in to comment.