makeporngreatagain.pro
yeahporn.top
hd xxx

Flattening a Docker Image to a Single Layer

3,644
  1. Set up a new project directory to create a basic image:
    cd ~/
    mkdir alpine-hello
    cd alpine-hello
    vi Dockerfile

     

  2. Create a Dockerfile that will result in a multi-layered image:
    FROM alpine:3.9.3
    RUN echo "Hello, World!" > message.txt
    CMD cat message.txt

     

  3. Build the image and check how many layers it has:
    docker build -t nonflat .
    docker image history nonflat

     

  4. Run a container from the image and export its file system to an archive:
    docker run -d --name flat_container nonflat
    docker export flat_container > flat.tar

     

  5. Import the archive to a new image and check how many layers the new image has:
    cat flat.tar | docker import - flat:latest
    docker image history flat
Leave A Reply

Your email address will not be published.

baseofporn.com https://www.opoptube.com
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.