Announcement

Collapse
No announcement yet.

How to Build Docker Images by using Containers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Build Docker Images by using Containers?

    I want to build container base image for Docker image.

    Can anyone help me out to do this?

    Thanks in advance!

  • #2
    Commit the container and utilized it with the FROM instruction in the Dockerfile of the image you want to build.

    Comment


    • #3
      Is this the only way to do it? Or, there are some other ways as well? It will be helpful if anyone can explain it.

      Comment


      • #4
        It is easy to get started building images if you are already familiar with using containers. A union file system (UFS) mount provides a container's file system so any changes that you make to the file system inside a container will be written as new layers that are owned by the container that created them.
        The basic workflow for building an image from a container includes three steps. First, you need to create a container from an existing image. You will choose the image based on what you want to be included with the new finished image and the tools you will need to make the changes.

        The second step is to actually modify the file system of the container. These changes will be written to a new layer on the union file system for the container. The relationship between images, layers, and repositories will be revisited again in this chapter.

        Finally, once the changes have been made the last step is to commit those changes. Once the changes are committed, you will be able to create new containers from the resulting image. If you want to know more, visit http://www.developer.com/design/buil...container.html

        Comment

        Working...
        X