docker_practice/container/run.md

62 lines
2.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#
`exited`
Docker
##
`docker run`
Hello World
```bash
$ docker run ubuntu:18.04 /bin/echo 'Hello world'
Hello world
```
`/bin/echo 'hello world'`
bash
```bash
$ docker run -t -i ubuntu:18.04 /bin/bash
root@af8bae53bdd3:/#
```
`-t` Dockerpseudo-tty `-i`
```bash
root@af8bae53bdd3:/# pwd
/
root@af8bae53bdd3:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
```
`docker run` Docker
* [registry](../repository/README.md)
*
*
* 宿
* ip
*
*
##
`docker container start` `exited`
`ps` `top`
```bash
root@ba267838cc1b:/# ps
PID TTY TIME CMD
1 ? 00:00:00 bash
11 ? 00:00:00 ps
```
bash 使 Docker