Docker image layers vernacular – referencing layer order

How do I properly convey a layer is “later” than another layer.

Consider the following Dockerfile:

  • How to access a directory in hosts machine from inside a docker container?
  • Where is Docker storing the images? [closed]
  • Tomcat + MySQL docker container outputting utf8 text with wrong encoding
  • GNU parallel to keep docker-compose in attached mode
  • Docker run error: “Thin Pool has free data blocks which is less than minimum required”
  • Docker compose on docker swarm cluster separate containers on separate nodes
  • FROM ubuntu:15.10
    COPY . /app
    RUN make /app
    CMD python /app/app.py
    

    This Dockerfile contains four commands, each of which creates a layer.

    How do I describe the RUN layer is later than the COPY layer? Context being, later layers that install patches may mitigate vulnerabilities that are introduced in earlier layers.

    In Code

    In code, the CMD layer is the bottom layer. Hence, in code, the lower a layer is, the later it is.

    Docker overview docs

    There is only a reference to a “final” layer.

    About images, containers, and storage drivers | Docker Documentation,

    Docker references layers that supersede other layers in the following ways:

    • last
    • on top
    • before

    Docker image shows later images as “higher”

    Docker image shows later images as "higher"

  • Got an error when running rake db:create in Docker
  • how to get docker container to read from stdin?
  • How to connect cassandra which is in a docker image from outside the OS
  • Installing docker containers via chef with staged files
  • Using rbenv with Docker
  • Connecting postgres from typeorm docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.