Hello
I need to reduce the number of layers in my container image. I already know that only the RUN, COPY, and ADD instructions create new layers, and I know I can combine all the RUN lines or the COPY and ADD lines. However, I'm wondering if I can combine a RUN instruction with an ADD instruction.
Thanks for your help!
You cannot, the syntax does not support this because the 2 commands have different functions, ADD copies files into the container and RUN executes commands in the container.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.