Skip to content

Commit

Permalink
improve: remove excess from built image
Browse files Browse the repository at this point in the history
  • Loading branch information
harivyasi committed Mar 6, 2025
1 parent 36486d8 commit 669db01
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends --autoremove --fix-missing python3.12 python3-pip python3-dev python3-venv build-essential libmagic1 curl git

WORKDIR /srv
RUN git clone --single-branch --branch dev-deploy-1 --depth=1 https://github.com/ComPlat/chemotion-converter-app chemotion
RUN git clone --single-branch --branch dev-deploy-1 --depth=1 https://github.com/ComPlat/chemotion-converter-app chemotion && \
rm -rf /srv/chemotion/.git

WORKDIR /srv/chemotion

Expand All @@ -56,7 +57,7 @@ ENV PATH=/srv/chemotion/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi
DATASETS_DIR=/srv/chemotion/datasets \
HTPASSWD_PATH=/srv/chemotion/htpasswd

RUN apt-get remove -y git && apt-get -y clean && \
RUN apt-get remove -y git build-essential && apt-get -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Stage 3: finalize the image
Expand All @@ -69,10 +70,4 @@ CMD ["gunicorn", "--bind", "0.0.0.0:4000", "converter_app.app:create_app()", "--
# gunicorn --bind 0.0.0.0:4000 "converter_app.app:create_app()" --preload

HEALTHCHECK --interval=5s --timeout=3s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:4000/

LABEL \
"org.opencontainers.image.authors"="Chemotion Team" \
"org.opencontainers.image.title"="Chemotion Converter" \
"org.opencontainers.image.description"="Image for Chemotion Converter" \
"chemotion.internal.service.id"="converter"
CMD curl --fail http://localhost:4000/

0 comments on commit 669db01

Please sign in to comment.