Skip to content

Optimization: issue rm in same code block as COPY #28

@riazarbi

Description

@riazarbi

RUN rm /oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm && \
is a rm command that is in a separate Docker RUN block from where you copy the file in to the build.

Because they are in separate code blocks, the rm command has no effect - it's in a new overlay that sits on top of the last one. In order to keep the image size down, any expansionary actions (such as copying in a large deb file) need to also have the rm command in the same Docker RUN operation.

I suggest combining these lines with a few nice 'n ugly \ && joins.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions