Skip to content

Commit 4ff335b

Browse files
authored
Merge pull request #6 from SergeyMi37/master
change docker in multi-stage mode to reduce size
2 parents 55a4446 + a55fba4 commit 4ff335b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG IMAGE=intersystemsdc/iris-community:2020.1.0.209.0-zpm
77
ARG IMAGE=intersystemsdc/iris-community:2020.1.0.215.0-zpm
88
ARG IMAGE=intersystemsdc/iris-community:2020.2.0.196.0-zpm
99
ARG IMAGE=intersystemsdc/iris-community
10-
FROM $IMAGE
10+
FROM $IMAGE as builder
1111

1212
USER root
1313

@@ -41,3 +41,11 @@ RUN \
4141
# bringing the standard shell back
4242
SHELL ["/bin/bash", "-c"]
4343
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]
44+
45+
FROM $IMAGE as final
46+
47+
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
48+
49+
RUN --mount=type=bind,source=/,target=/builder/root,from=builder \
50+
cp -f /builder/root/usr/irissys/iris.cpf /usr/irissys/iris.cpf && \
51+
python3 /irisdev/app/copy-data.py -c /usr/irissys/iris.cpf -d /builder/root/

0 commit comments

Comments
 (0)