windows - How to re-run a stopped named Ubuntu in docker? -


i've create ubuntu container in docker (on windows 10) following:

> docker run --name omuntu -it ubuntu 

after that, installed packages in named container such python. then, exited container exit command. now, question how can start named container again, how run commands inside bash , access previous installed packages?

i should have mentioned docker start omuntu run service , following on docker ps:

container id        image               command             created              status              ports               names 932a2859c1ca        ubuntu              "/bin/bash"         36 minutes ago      3 seconds                             omuntu 

but cannot run command such i've ran first time, instance , command:

root@932a2859c1ca:/# python -v 

you should using 2 default false options --attach, -a , --interactive, -i such below:

> docker start -ai omuntu 

after that, get:

root@932a2859c1ca:/# 

now, can run command inside ubuntu container. of course, installed packages available in container. see more options here.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -