English
« Back to projectatomic.io
Ask Your Question
0

Remove docker container

asked 2016-03-29 10:10:54 +0000

Gytis gravatar image

Hello,

is there a way to remove docker container when atomic app is stopped (similarly like --rm would do when running in interactive mode)? My docker artefact run script looks like this:

docker run -d --name jacorb-name-server -p $jacorb_host_port:3528 $jacorb_image

I use --name, because I have other container which is linked. However, app cannot be restarted after "atomic stop", because name collision happens.

edit retag flag offensive close merge delete

Comments

Not quite following. What container do you want to remove? Which one do you want to replace?

jberkus ( 2016-03-30 21:09:08 +0000 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2017-08-20 11:59:16 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

TutuApp apk
TutuApp apk

edit flag offensive delete link more
0

answered 2017-08-19 09:40:44 +0000

reiner gravatar image

Having bookmarked this immensely useful tip a while ago, the two-liner above :) can be now done in one line: docker rm -f $(docker ps -a -q)

And similar for all images: docker rmi $(docker images -q)

Vshare apk download is an excellent app store get all latest apps and games for free on your Android and iOS devices.

edit flag offensive delete link more
0

answered 2016-07-21 15:07:18 +0000

The command docker rm CONTAINER removes the specified container.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2016-03-29 10:10:54 +0000

Seen: 254 times

Last updated: Aug 20