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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -