Skip to content

Commit

Permalink
Merge pull request #6 from SergeyMi37/master
Browse files Browse the repository at this point in the history
change docker in multi-stage mode to reduce size
  • Loading branch information
evshvarov authored Oct 26, 2023
2 parents 55a4446 + a55fba4 commit 4ff335b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG IMAGE=intersystemsdc/iris-community:2020.1.0.209.0-zpm
ARG IMAGE=intersystemsdc/iris-community:2020.1.0.215.0-zpm
ARG IMAGE=intersystemsdc/iris-community:2020.2.0.196.0-zpm
ARG IMAGE=intersystemsdc/iris-community
FROM $IMAGE
FROM $IMAGE as builder

USER root

Expand Down Expand Up @@ -41,3 +41,11 @@ RUN \
# bringing the standard shell back
SHELL ["/bin/bash", "-c"]
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

FROM $IMAGE as final

ADD --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} https://github.com/grongierisc/iris-docker-multi-stage-script/releases/latest/download/copy-data.py /irisdev/app/copy-data.py

RUN --mount=type=bind,source=/,target=/builder/root,from=builder \
cp -f /builder/root/usr/irissys/iris.cpf /usr/irissys/iris.cpf && \
python3 /irisdev/app/copy-data.py -c /usr/irissys/iris.cpf -d /builder/root/

0 comments on commit 4ff335b

Please sign in to comment.