iris-docker-multi-stage-script
A python script to keep your docker iris images in shape ;)
Witout changing your dockerfile or your code you can reduce the size of your image by 50% or more !
TL;DR
Name the builder image builder
and the final image final
and add this to end of your Dockerfile:
Modify your Dockerfile to use a multi-stage build:
ARG IMAGE=intersystemsdc/irishealth-community:latest
FROM $IMAGE as builder
Add this to end of your Dockerfile:
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/
Boom! You're done!