Can somebody help me?
Sorry for the long question but I'm trying to describe my issue in as much detail as possible.
I'm trying to have a software that installed in my docker image.
- In the below image, at number 2, you can see I
COPY ace/ /tmp/
-ace/
is a directory that contains my software installer. In the dockerfile, I already remove /tmp/ folder after the installation has been completed.
The question is How can I reduce the size of the layer used forCOPY
the installer from docker context to/tmp/
. - Meanwhile, you can see, at number 1, something similar with number 2, but it's size has been reduced, the actual size of
repo/
is 1 Gb. I don't know what is the difference here
My dockerfile:
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
python3.6 python3-venv
COPY ace/ /tmp/
RUN /bin/bash -c ' \
Some commands to install ace from /tmp/ such as: apt install -y /tmp/*.deb;
rm -r /tmp/*'
COPY repo/ /tmp/
RUN /bin/bash -c ' \
Some commands to install environment from /tmp/ such as: /tmp/setup_venv.sh;
rm -r /tmp/*'