차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
podman_로컬_컨테이너_런타임에서_포드_및_컨테이너_관리 [2021/07/27 01:51] – 만듦 koov | podman_로컬_컨테이너_런타임에서_포드_및_컨테이너_관리 [2021/07/27 01:57] (현재) – koov | ||
---|---|---|---|
줄 151: | 줄 151: | ||
$ curl http:// | $ curl http:// | ||
+ | podman rulez | ||
</ | </ | ||
</ | </ | ||
- | podman rulez | + | 다음은 컨테이너를 나열할 때의 모습입니다. |
- | And here is what it looks like when listing containers: | + | <WRAP prewrap> |
+ | <code bash> | ||
$ sudo podman ps -ap | $ sudo podman ps -ap | ||
CONTAINER ID IMAGE | CONTAINER ID IMAGE | ||
ac8839fc7dea | ac8839fc7dea | ||
c2f7c5651275 | c2f7c5651275 | ||
- | + | </ | |
- | + | </ | |
- | MariaDB example | + | |
- | The following asciinema demo shows how to create a pod via the shortcut method. | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | Pods and container management | + | ===== Pods and container management |
- | In Podman, | + | '' |
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman pod ps | $ sudo podman pod ps | ||
POD ID | POD ID | ||
fa7924a5196c | fa7924a5196c | ||
+ | |||
$ sudo podman ps -p | $ sudo podman ps -p | ||
CONTAINER ID IMAGE COMMAND | CONTAINER ID IMAGE COMMAND | ||
02e37a3b9873 | 02e37a3b9873 | ||
2597454063f8 | 2597454063f8 | ||
- | + | </ | |
- | + | </ | |
- | If we wanted to stop and start the nginx container, the status of the MariaDB container and the pod itself will remain unchanged. | + | |
+ | '' | ||
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman stop optimistic_edison | $ sudo podman stop optimistic_edison | ||
02e37a3b987300e9124b61820119ae425c5e496b907800ecaf1194a3f50e5dcc | 02e37a3b987300e9124b61820119ae425c5e496b907800ecaf1194a3f50e5dcc | ||
- | + | </ | |
- | + | </ | |
- | With the nginx container stopped, we can still observe the demopod is running and the MariaDB container remains unchanged. | + | |
+ | '' | ||
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman pod ps | $ sudo podman pod ps | ||
POD ID | POD ID | ||
fa7924a5196c | fa7924a5196c | ||
+ | |||
$ sudo podman ps -p | $ sudo podman ps -p | ||
CONTAINER ID IMAGE COMMAND | CONTAINER ID IMAGE COMMAND | ||
2597454063f8 | 2597454063f8 | ||
- | + | </ | |
- | + | </ | |
- | And we can start the nginx container to restore the pod back to its original state. | + | |
+ | 그리고 '' | ||
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman start optimistic_edison | $ sudo podman start optimistic_edison | ||
optimistic_edison | optimistic_edison | ||
+ | |||
$ sudo podman ps -p | $ sudo podman ps -p | ||
CONTAINER ID IMAGE COMMAND | CONTAINER ID IMAGE COMMAND | ||
02e37a3b9873 | 02e37a3b9873 | ||
2597454063f8 | 2597454063f8 | ||
- | + | </ | |
+ | </ | ||
- | We can also stop the pod and all of its containers using the podman pod stop command. | + | '' |
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman pod stop demodb | $ sudo podman pod stop demodb | ||
fa7924a5196cb403298ad2ce24f0db30a3790e80729c7704ef5fdc27302f7ad0 | fa7924a5196cb403298ad2ce24f0db30a3790e80729c7704ef5fdc27302f7ad0 | ||
+ | |||
$ sudo podman ps -ap | $ sudo podman ps -ap | ||
CONTAINER ID IMAGE COMMAND | CONTAINER ID IMAGE COMMAND | ||
줄 218: | 줄 227: | ||
2597454063f8 | 2597454063f8 | ||
3005ed8491d0 | 3005ed8491d0 | ||
- | + | </ | |
- | + | </ | |
- | And if we look at the status of the pod, it will show a state of “Exited”. | + | |
+ | 그리고 '' | ||
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman pod ps | $ sudo podman pod ps | ||
POD ID | POD ID | ||
fa7924a5196c | fa7924a5196c | ||
- | + | </ | |
+ | </ | ||
- | Likewise, we can also start the pod and all of its containers back up. After which, all the containers in the pod should be running and the pod should show a status of “Running”. | + | 마찬가지로 포드와 모든 컨테이너 백업을 시작할 수도 있습니다. 그런 다음 포드의 모든 컨테이너가 실행 중이어야 하며 포드는 '' |
+ | <WRAP prewrap> | ||
+ | <code bash> | ||
$ sudo podman pod start demodb | $ sudo podman pod start demodb | ||
fa7924a5196cb403298ad2ce24f0db30a3790e80729c7704ef5fdc27302f7ad0 | fa7924a5196cb403298ad2ce24f0db30a3790e80729c7704ef5fdc27302f7ad0 | ||
+ | |||
$ sudo podman ps -p | $ sudo podman ps -p | ||
CONTAINER ID IMAGE COMMAND | CONTAINER ID IMAGE COMMAND | ||
02e37a3b9873 | 02e37a3b9873 | ||
2597454063f8 | 2597454063f8 | ||
+ | |||
$ sudo podman pod ps | $ sudo podman pod ps | ||
POD ID | POD ID | ||
fa7924a5196c | fa7924a5196c | ||
+ | </ | ||
+ | </ | ||
- | There is also a podman pod restart | + | '' |
- | + | ||
- | + | ||
- | + | ||
- | Wrap up | + | |
- | The ability for Podman to handle pod deployment is a clear differentiator to other container runtimes. | + | |
- | For more information on Podman, make sure you visit the libpod project page on github. Relevant blogs and news related to Podman can also be found at podman.io. | + | ===== 참조링크 ===== |
+ | * https:// | ||
- | Podman is included with Red Hat Enterprise Linux 7.6 as well as Red Hat Enterprise Linux 8 beta. | ||
- | More about Podman on the Red Hat Developer Blog | ||
- | Containers without daemons: Podman and Buildah available in RHEL 7.6 and RHEL 8 Beta | ||
- | Podman - The next generation of Linux container tools | ||
- | Intro to Podman (New in Red Hat Enterprise Linux 7.6) | ||
- | Managing containerized system services with Podman |