cancel
Showing results for 
Search instead for 
Did you mean: 
VictoriaSexmer1
Flight Engineer
Flight Engineer
  • 394 Views

Container image: layers

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!

1 Reply
ohthree
Mission Specialist
Mission Specialist
  • 340 Views

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. 

Join the discussion
You must log in to join this conversation.