Here’s the table of contents:

  1. Show images and sizes
  2. Saving Docker image for import
  3. Mount volume for read and write function within container
  4. Copy file from and to container
  5. Delete image
  6. Commit changes to image

Show images and sizes

sudo docker image ls

Saving Docker image for import

docker export 'container_id' > docker_container.tar
docker import - importedcontainer < docker_container.tar

See!

Mount volume for read and write function within container

sudo docker run -v /home/user/<path>:/<container path>

See!

Copy file from and to container

docker cp src/. container_id:/target
docker cp container_id:/src/. target

See!

Delete image

docker image rm

Commit changes to image

docker commit -m "Changed" image_name

See!