Skip to content

Commit

Permalink
fix: 🐛 reduce down to minimal layers would reduce downstream image si…
Browse files Browse the repository at this point in the history
…ze, put it back
  • Loading branch information
yambottle committed Sep 1, 2023
1 parent 01ad5b9 commit 3206516
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dist/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,23 @@ ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /main
VOLUME /tmp/.X11-unix
CMD ["sh"]

# Squashed Final Image
FROM scratch
COPY --from=miniconda-build / /
LABEL maintainerName="Raphael Guzman" \
maintainerEmail="[email protected]" \
maintainerCompany="DataJoint"
USER anaconda:anaconda
# Add conda to path here for use in downstream dockerfiles
ENV PATH /opt/conda/bin:$PATH
ENV ENV "/home/anaconda/.ashrc"
ENV HOME /home/anaconda
ENV LANG C.UTF-8
ENV APK_REQUIREMENTS /tmp/apk_requirements.txt
ENV PIP_REQUIREMENTS /tmp/pip_requirements.txt
ENV CONDA_REQUIREMENTS /tmp/conda_requirements.txt
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /main
VOLUME /tmp/.X11-unix
CMD ["sh"]
19 changes: 19 additions & 0 deletions dist/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,22 @@ ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /main
VOLUME /tmp/.X11-unix
CMD ["bash"]

# Squashed Final Image
FROM scratch
COPY --from=miniconda-build / /
LABEL maintainerName="Raphael Guzman" \
maintainerEmail="[email protected]" \
maintainerCompany="DataJoint"
USER anaconda:anaconda
# Add conda to path here for use in downstream dockerfiles
ENV PATH /opt/conda/bin:$PATH
ENV HOME /home/anaconda
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV APT_REQUIREMENTS /tmp/apt_requirements.txt
ENV PIP_REQUIREMENTS /tmp/pip_requirements.txt
ENV CONDA_REQUIREMENTS /tmp/conda_requirements.txt
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /main
VOLUME /tmp/.X11-unix
CMD ["bash"]

0 comments on commit 3206516

Please sign in to comment.