moby/daemon
Doug Davis 71a4990229 Fix error when trying to delete an image due to a bad container
I ran into a situation where I was trying:
	`docker rmi busybox`
and it kept failing saying:
    `could not find image: Prefix can't be empty`

While I have no idea how I got into this situation, it turns out this is
error message is from `daemon.canDeleteImage()`. In that func we loop over
all containers checking to see if they're using the image we're trying to
delete.  In my case though, I had a container with no ImageID. So the code
would die tryig to find that image (hence the "Prefix can't be empty" err).
This would stop all processing despite the fact that the container we're
checking had nothing to do with 'busybox'.

My change logs the bad situation in the logs and then skips that container.
There's no reason to fail all `docker rmi ...` calls just because of one
bad container.

Will continue to try to figure out how I got a container w/o an ImageID
but as of now I have no idea, I didn't do anything but normal docker cli
commands.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-27 19:19:43 -07:00
..
events New package daemon/events 2015-04-07 08:43:14 -07:00
execdriver Merge pull request #13491 from jfrazelle/revert-exec-privileged 2015-05-26 16:41:50 -07:00
graphdriver Windows: graphdriver refactor 2015-05-20 08:51:27 -07:00
logger Pass -log-opts map to logdrivers 2015-05-18 16:50:14 +00:00
network Docker integration with libnetwork 2015-05-19 22:40:19 +00:00
attach.go Move container.WaitStop, AttachWithLogs and WsAttachWithLogs to daemon service in api server 2015-05-11 19:56:41 +02:00
changes.go Refactor server to use daemon as the service layer in controllers 2015-05-02 03:12:58 +02:00
commit.go Windows: Commit() rwTar defer close 2015-04-30 12:17:33 -07:00
config.go Docker integration with libnetwork 2015-05-19 22:40:19 +00:00
config_linux.go Windows: Start of daemon config refactor 2015-05-12 09:50:32 -07:00
config_windows.go Windows: Simple import error on config_windows.go 2015-05-16 12:18:55 -07:00
container.go Do not force syscall.Unmount on container cleanup. 2015-05-26 14:28:26 -07:00
container_linux.go Merge pull request #13493 from jlhawn/volume_unmount_fix 2015-05-27 08:44:11 -07:00
container_unit_test.go Ensure container names start with a-zA-Z0-9 2014-09-12 10:45:07 -07:00
container_windows.go Windows: Fix up container again 2015-05-26 09:33:55 -07:00
copy.go Refactor server to use daemon as the service layer in controllers 2015-05-02 03:12:58 +02:00
create.go Merge pull request #13161 from calavera/plugin_discovery 2015-05-23 18:44:18 -07:00
daemon.go Preinitialize MountPoints to avoid assigning to a nil map 2015-05-25 19:37:57 -07:00
daemon_aufs.go Replace aliased imports of logrus, fixes #11762 2015-03-26 23:22:04 +01:00
daemon_btrfs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_devicemapper.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_no_aufs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_overlay.go Remove the last references to overlayfs 2014-12-03 14:06:19 +01:00
daemon_test.go Add regression test to make sure we can load old containers with volumes. 2015-05-26 15:28:58 -07:00
daemon_unit_test.go Move security opts to HostConfig 2014-11-25 01:02:30 +02:00
daemon_zfs.go Windows: No ZFS graphdriver 2015-05-14 15:57:45 -07:00
debugtrap.go Add SIGUSR1 handler for dumping stack/goroutine traces 2015-05-12 10:09:23 +10:00
debugtrap_unsupported.go Fix package on debugtrap_unsupported.go 2015-05-13 16:38:59 -07:00
delete.go Fix unregister stats on when rm running container 2015-05-26 22:22:03 -04:00
exec.go Revert "Add docker exec run a command in privileged mode" 2015-05-26 14:12:16 -07:00
exec_linux.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
exec_windows.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
export.go Remove job from export 2015-04-13 15:27:45 +02:00
history.go History.Swap Use parallel assignment to swap elements, as it's 2015-03-25 00:13:13 +03:00
image_delete.go Fix error when trying to delete an image due to a bad container 2015-05-27 19:19:43 -07:00
info.go Add DOCKER_EXPERIMENTAL environment variable 2015-05-20 12:21:17 -07:00
inspect.go Volumes refactor and external plugin implementation. 2015-05-21 20:34:17 -07:00
kill.go Remove Job from docker kill 2015-04-09 16:06:54 -07:00
list.go Revert "Fix inconsistent date formats in API" 2015-05-14 17:31:45 -07:00
logdrivers_linux.go Windows: Factor out syslog and journald 2015-05-14 10:34:09 -07:00
logdrivers_windows.go Windows: Factor out syslog and journald 2015-05-14 10:34:09 -07:00
logs.go Merge pull request #12226 from ahmetalpbalkan/logdrivers/refactoring 2015-05-13 11:00:50 -07:00
monitor.go Add RestartPolicy methods instead of using strings checking 2015-05-16 14:15:28 +02:00
pause.go Refactor server to use daemon as the service layer in controllers 2015-05-02 03:12:58 +02:00
README.md Add readme for daemon directory 2014-05-17 17:56:02 +00:00
rename.go Remove Job from rename 2015-04-10 01:52:55 +08:00
resize.go Refactor server to use daemon as the service layer in controllers 2015-05-02 03:12:58 +02:00
restart.go Remove job from restart 2015-04-16 18:50:24 +02:00
start.go Move setHostConfig to daemon file 2015-04-23 10:23:02 +08:00
state.go Fix a typo in docker/daemon/state.go 2015-04-16 10:56:15 -04:00
state_test.go Fix vet errors about unkeyed fields 2014-12-12 10:44:59 -08:00
stats.go Allow pulling stats once and disconnecting. 2015-05-04 10:49:13 -04:00
stats_collector.go daemon/stats_collector: refactor getSystemCpuUsage 2015-05-15 12:22:50 +03:00
stop.go Remove job from stop 2015-04-12 00:41:16 +02:00
top.go Remove Job from docker top 2015-04-09 18:17:50 -07:00
unpause.go Refactor server to use daemon as the service layer in controllers 2015-05-02 03:12:58 +02:00
utils.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
utils_linux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_nolinux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_test.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
volumes.go Fix container unmount networkMounts 2015-05-26 17:38:26 -07:00
volumes_experimental.go Allow named volumes for external drivers. 2015-05-21 20:34:17 -07:00
volumes_experimental_unit_test.go Allow named volumes for external drivers. 2015-05-21 20:34:17 -07:00
volumes_linux.go Volumes refactor and external plugin implementation. 2015-05-21 20:34:17 -07:00
volumes_stubs.go Allow named volumes for external drivers. 2015-05-21 20:34:17 -07:00
volumes_stubs_unit_test.go Allow named volumes for external drivers. 2015-05-21 20:34:17 -07:00
volumes_unit_test.go Allow named volumes for external drivers. 2015-05-21 20:34:17 -07:00
volumes_windows.go Windows: Fix volume_windows compile 2015-05-26 09:43:21 -07:00
wait.go Move container.WaitStop, AttachWithLogs and WsAttachWithLogs to daemon service in api server 2015-05-11 19:56:41 +02:00

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver
  • networkdriver

Code pertaining to storing images:

  • graphdriver