- Containers in OpenStack
- Pradeep Kumar Singh Madhuri Kumari
- 141字
- 2021-07-02 21:17:25
Creating containers
Launching a container is simple, as docker run passes the image name you would like to run and the command to run this within the container. If the image doesn't exist on your local machine, Docker will attempt to fetch it from the public image registry:
$ sudo docker run --name hello_world ubuntu /bin/echo hello world
In the preceding example, the container will start, print hello world, and then stop. Containers are designed to stop once the command executed within them has exited.
As an example, let's run a container using the latest image in Ubuntu. The combination of the -i and -t switches gives you interactive shell access to the container:
$ sudo docker run -it ubuntu root@a5b3bce6ed1b:/# ls bin boot dev etc home lib lib64 media mnt opt proc root
run sbin srv sys tmp usr var
推薦閱讀
- Machine Learning for Cybersecurity Cookbook
- 傳感器技術實驗教程
- 協作機器人技術及應用
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 機器人智能運動規劃技術
- Visual C# 2008開發技術詳解
- Photoshop CS3特效處理融會貫通
- 機器人編程實戰
- 運動控制系統應用與實踐
- 工業機器人運動仿真編程實踐:基于Android和OpenGL
- Mastering Game Development with Unreal Engine 4(Second Edition)
- 工業機器人維護與保養
- TensorFlow Reinforcement Learning Quick Start Guide
- INSTANT Munin Plugin Starter
- Building Google Cloud Platform Solutions