Skip to content

Commit

Permalink
Update: reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
cbackas committed Oct 27, 2024
1 parent f4953ed commit 883cd2b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,22 @@ ADD ./web_service/templates /app/templates
RUN npm ci
RUN npx tailwindcss -i ./styles/tailwind.css -o ./assets/main.css

FROM rust:slim-bookworm as runtime
RUN apt-get update && apt-get install -y chromium-driver chromium dumb-init
FROM debian:bookworm-slim as runtime
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
chromium-driver \
chromium \
dumb-init \
&& \
rm -rf /var/lib/apt/lists/*

COPY --from=build /app/target/release/web_service /usr/local/bin/web_service
COPY --from=build /app/target/release/map_service /usr/local/bin/map_service
COPY --from=web_assets /app/assets /app/assets

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /app
ENTRYPOINT [ "entrypoint.sh" ]
Expand Down

0 comments on commit 883cd2b

Please sign in to comment.