Why "chown" followed by a COPY/ADD instruction increases the docker image size in Red Hat Enterprise Linux 7 ?

Solution Unverified - Updated -

Issue

  • Why "chown" followed by a COPY/ADD instruction increase the docker image size in Red Hat Enterprise Linux 7 ?
  • Refer the below given Dockerfile. Container image built using the below Dockerfile would be increased by another 200MB
From alpine
ADD 200mbFile 200mbFile
RUN chown root:504 200mbFile

Environment

  • Red Hat Enterprise Linux 7
  • docker-1.12-X or docker-latest-1.13.1-X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content