[COMMAND] [ARG...]" command in Linux to create and start a docker container."/> [COMMAND] [ARG...]" command in Linux to create and start a docker container.">

Home  >  Article  >  Operation and Maintenance  >  How to create a new docker container in linux

How to create a new docker container in linux

尚
Original
2020-03-18 16:04:093364browse

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] <IMAGE NAME> [COMMAND] [ARG...]

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

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 the docker tutorial column 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!

Statement:
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