1

I'm using ubuntu-16.04 desktop and installed Docker-1.5-1 and docker-engine-17.05.0~ce-0~ubuntu-xenial, in which I installed openmedicus/phplist. My aim is to remove the container, and the image as well.

The issue is that the container is removed successfully but after some time the container is automatically created with a different container ID.

I even tried to remove images also but faced the same issue.

Trying to remove images:

$ docker images | grep phplist
openmedicus/phplist             latest              24d3de5279cb        4 months ago        694MB

$ docker rmi openmedicus/phplist:latest --force
Untagged: openmedicus/phplist:latest
Untagged: penmedicus/phplist@sha256:6ac98b2f624eb8cd61b64c4b398650975a876224d5925175c58ff0c1b05a2593

$ docker images | grep phplist    ## Delete Sucessfully

Now trying to remove container :

$ docker ps
b02b641560e8        24d3de5279cb             "/bin/sh -c /usr/s..."   2 minutes ago       Up 2 minutes        0.0.0.0:8080->80/tcp                                 
$ docker stop b02b641560e8
b02b641560e8

$ docker rm b02b641560e8 --force   # Remove Sucessfully
b02b641560e8

Again, the container is created automatically :

$ docker ps
2c78199dc40c        openmedicus/phplist      "/bin/sh -c /usr/s..."   29 seconds ago      Up 28 seconds       0.0.0.0:8080->80/tcp                                 phplist

How can I remove the Docker container and image permanently?

9
  • 1
    I highly doubt an apt-get install docker-engine would end up running any container, so there's probably something else you did and omitted in this question.
    – Tensibai
    Commented Jul 10, 2017 at 11:31
  • @Tensibai tried but not working Commented Jul 10, 2017 at 12:14
  • @nullpointer very strange behavior. Why isn't docker version 17 or so but 1.5? docker --version
    – Ta Mu
    Commented Jul 10, 2017 at 12:17
  • Tried what ? phplist is a mass mailing system, there's no chance it could get installed as a dependency. How did you install docker ?
    – Tensibai
    Commented Jul 10, 2017 at 12:18
  • 1
    Just because there's something somewhere on your system doing a docker run openmedicus/phplist, check /etc/systemd/system/docker-phplist.service presence according to the docker-hub readme of the image you're listing: hub.docker.com/r/openmedicus/phplist
    – Tensibai
    Commented Jul 10, 2017 at 13:01

2 Answers 2

1

Check the following:

Something like watchtower maybe running and monitoring your host machine on which the containers are running. Watchtower can re-pull your images from a registry and re-launch a container for you. There are some tools similar to watchtower which do this.

1
  • 2
    This sounds plausible, I've had this before with an in-house daemon that pulled images and created containers.
    – RichVel
    Commented Jul 28, 2017 at 8:32
0

This can also com from swarm. A look here to find some more

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 11, 2023 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.