VictoriaSexmer1

Flight Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024
12:02 PM
- 551 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024
02:10 PM
- 497 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.