Skip to content

Commit

Permalink
Merge pull request #21 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 9fb9c75 + 6b9932a commit 9c739d7
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
@@ -1,5 +1,5 @@
ARG IMAGE=intersystemsdc/irishealth-community:latest
FROM $IMAGE
FROM $IMAGE as builder

WORKDIR /home/irisowner/irisdev
#RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
Expand All @@ -9,3 +9,11 @@ RUN --mount=type=bind,src=.,dst=. \
iris start IRIS && \
iris session IRIS < iris.script && \
iris stop IRIS quietly

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 9c739d7

Please sign in to comment.