[COMMAND] [ARG...]" command in Linux to create and start a docker container."> How to create a new docker container in linux-Docker-php.cn

How to create a new docker container in linux

Release: 2020-03-18 16:04:09
Original
3281 people have browsed it

How to create a new docker container in linux

Linux Create and start a Docker container:

Recommended learning:Linux video tutorial

Use the following command to start a new Docker container. This will start a new container and give you access to the container using the /bin/bash shell.

# docker run [OPTIONS]  [COMMAND] [ARG...]
Copy after login

For example, the following command will create a new docker container using an image named "ubuntu". To list all available images, use the docker images command

# docker run -i -t ubuntu /bin/bash
Copy after login

To exit a Docker container, press ctrl p q. This will cause the container to run in the background and provide a console to the host system. If you use the exit command, it will stop the current container.

For more related tutorials, please pay attention to thedocker tutorialcolumn on the PHP Chinese website.

The above is the detailed content of How to create a new docker container in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!