docker-image

Can’t delete docker image with dependent child images

烂漫一生 提交于 2019-11-28 05:35:51
I am trying docker rmi c565603bc87f Error: Error response from daemon: conflict: unable to delete c565603bc87f (cannot be forced) - image has dependent child images So i can't delete image even with -f flag. How to delete image then and all of its children ? Linux and docker version: uname -a Linux goracio-pc 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux docker version Client: Version: 1.11.2 API version: 1.23 Go version: go1.5.4 Git commit: b9f10c9 Built: Wed Jun 1 22:00:43 2016 OS/Arch: linux/amd64 Server: Version: 1.11.2 API version: 1.23 Go

What is the difference between import and load in Docker?

南笙酒味 提交于 2019-11-27 18:41:43
I understand the difference between export (for containers) and save (for images). But at the end of the day the tarball produced by either save or export should be used as an image . So why are there 2 commands to make an image from a tarball? VonC docker save will indeed produce a tarball, but with all parent layers, and all tags + versions. docker export does also produce a tarball, but without any layer/history. It is often used when one wants to "flatten" an image , as illustrated in " Flatten a Docker container or image " from Thomas Uhrig : docker export <CONTAINER ID> | docker import -

Run a Docker image as a container

给你一囗甜甜゛ 提交于 2019-11-27 08:55:40
问题 I built a Docker image from a dockerfile. I see the image was built successfully, but what do I do with it? Shouldn't it be able to run as a container? 回答1: The specific way to run it depends on whether you gave the image a tag/name or not. $ docker images REPOSITORY TAG ID CREATED SIZE ubuntu 12.04 8dbd9e392a96 4 months ago 131.5 MB (virtual 131.5 MB) With a name (let's use Ubuntu ): $ docker run -i -t ubuntu:12.04 /bin/bash Without a name, just using the ID: $ docker run -i -t 8dbd9e392a96

docker run <IMAGE> <MULTIPLE COMMANDS>

岁酱吖の 提交于 2019-11-27 05:52:19
I'm trying to run MULTIPLE commands like this. docker run image cd /path/to/somewhere && python a.py But this gives me "No such file or directory" error because it is interpreted as... "docker run image cd /path/to/somewhere" && "python a.py" It seems that some ESCAPE characters like "" or () are needed. So I also tried docker run image "cd /path/to/somewhere && python a.py" docker run image (cd /path/to/somewhere && python a.py) but these didn't work. I have searched for Docker Run Reference but have not find any hints about ESCAPE characters. anhlc To run multiple commands in docker, use

Can’t delete docker image with dependent child images

六月ゝ 毕业季﹏ 提交于 2019-11-27 05:20:32
问题 I am trying docker rmi c565603bc87f Error: Error response from daemon: conflict: unable to delete c565603bc87f (cannot be forced) - image has dependent child images So i can't delete image even with -f flag. How to delete image then and all of its children ? Linux and docker version: uname -a Linux goracio-pc 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux docker version Client: Version: 1.11.2 API version: 1.23 Go version: go1.5.4 Git commit:

What is the difference between import and load in Docker?

倖福魔咒の 提交于 2019-11-26 19:33:09
问题 I understand the difference between export (for containers) and save (for images). But at the end of the day the tarball produced by either save or export should be used as an image . So why are there 2 commands to make an image from a tarball? 回答1: docker save will indeed produce a tarball, but with all parent layers, and all tags + versions. docker export does also produce a tarball, but without any layer/history. It is often used when one wants to "flatten" an image, as illustrated in

What is the difference between a Docker image and a container?

我与影子孤独终老i 提交于 2019-11-26 16:50:27
When using Docker, we start with a base image. We boot it up, create changes and those changes are saved in layers forming another image. So eventually I have an image for my PostgreSQL instance and an image for my web application, changes to which keep on being persisted. So the question is: What is a container? Thomas Uhrig An instance of an image is called a container. You have an image, which is a set of layers as you describe. If you start this image, you have a running container of this image. You can have many running containers of the same image. You can see all your images with docker

docker run <IMAGE> <MULTIPLE COMMANDS>

女生的网名这么多〃 提交于 2019-11-26 11:47:37
问题 I\'m trying to run MULTIPLE commands like this. docker run image cd /path/to/somewhere && python a.py But this gives me \"No such file or directory\" error because it is interpreted as... \"docker run image cd /path/to/somewhere\" && \"python a.py\" It seems that some ESCAPE characters like \"\" or () are needed. So I also tried docker run image \"cd /path/to/somewhere && python a.py\" docker run image (cd /path/to/somewhere && python a.py) but these didn\'t work. I have searched for Docker

What is the difference between a Docker image and a container?

时光毁灭记忆、已成空白 提交于 2019-11-26 04:28:51
问题 When using Docker, we start with a base image. We boot it up, create changes and those changes are saved in layers forming another image. So eventually I have an image for my PostgreSQL instance and an image for my web application, changes to which keep on being persisted. What is a container? 回答1: An instance of an image is called a container. You have an image, which is a set of layers as you describe. If you start this image, you have a running container of this image. You can have many

How to remove old and unused Docker images

别说谁变了你拦得住时间么 提交于 2019-11-25 23:38:15
问题 When running Docker for a long time, there are a lot of images in system. How can I remove all unused Docker images at once safety to free up the storage? In addition, I also want to remove images pulled months ago, which have the correct TAG . So, I\'m not asking for removing untagged images only. I\'m searching for a way to remove general unused images, which includes both untagged and other images such as pulled months ago with correct TAG . 回答1: Update Sept. 2016: Docker 1.13: PR 26108