'Linux' 카테고리의 다른 글
uniq (0) | 2019.07.30 |
---|---|
musl / uclibc (0) | 2019.07.15 |
command line xml parse (0) | 2019.07.03 |
브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기 (0) | 2019.07.03 |
wget -m (mirror) (0) | 2019.06.26 |
uniq (0) | 2019.07.30 |
---|---|
musl / uclibc (0) | 2019.07.15 |
command line xml parse (0) | 2019.07.03 |
브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기 (0) | 2019.07.03 |
wget -m (mirror) (0) | 2019.06.26 |
명령어가 길어서 외우기에는 뇌의 여백이 부족하구나...
docker ps --filter "status=exited"
docker ps -f "status=exited"
[링크 : https://stackoverflow.com/questions/30231187/list-only-stopped-docker-containers]
UTS name space (0) | 2019.07.15 |
---|---|
LXC LXD (0) | 2019.07.15 |
docker import / export 그리고 save / load (0) | 2019.07.10 |
docker pid isolation (0) | 2019.07.10 |
docker layer / AUFS (0) | 2019.07.10 |
save / load는 layer 정보가 남은 채로 tar로 묶이지만
import / export는 남기지 않는다고
(그런 이유로 import로 불러오면 새로운 SHA값의 layer가 생성됨)
LXC LXD (0) | 2019.07.15 |
---|---|
docker ps exited만 보기 (0) | 2019.07.10 |
docker pid isolation (0) | 2019.07.10 |
docker layer / AUFS (0) | 2019.07.10 |
docker volume (0) | 2019.07.10 |
어제 적었나? 기억이 안나네..
아무튼 docker top을 통해서 외부에서 보는 PID를 볼 수 있는데
그걸 시스템의 PID와, container 안에서 보는 PID를 비교해 봄
docker 내부에서는 init가 1번이 아님!!에 유의
$ sudo docker top 8e $ ps -ef | grep 12118
$ sudo docker attach 8e [root@8e33f4758cd9 /]# ps -ef | grep bash |
+
2019.07.15
다른수업에서 docker 관련 확인해보니 이런식으로 뜬다.
별차이는 없지만 웬지 스샷 하나 찍고 싶어서? ㅋ
docker ps exited만 보기 (0) | 2019.07.10 |
---|---|
docker import / export 그리고 save / load (0) | 2019.07.10 |
docker layer / AUFS (0) | 2019.07.10 |
docker volume (0) | 2019.07.10 |
docker apache reload (0) | 2019.07.10 |
도커에서 AUFS라는걸 이용해서 layer를 구성하는 것으로 보인다.
아무튼. 이걸 이용해서 여러개의 이미지를 겹쳐서 무언가 새로운걸 만들수 있는 것 같긴한데..
[링크 : https://medium.com/@jessgreb01/digging-into-docker-layers-c22f948ed612]
docker import / export 그리고 save / load (0) | 2019.07.10 |
---|---|
docker pid isolation (0) | 2019.07.10 |
docker volume (0) | 2019.07.10 |
docker apache reload (0) | 2019.07.10 |
docker detach (0) | 2019.07.10 |
붙여넣기가 잘 안되서 짜증나네 -_-
아무튼, docker에서는 volume을 통해 외부 사용자 저장소를 container의 내부로 연결해서 사용이 가능하다.
Step 2: Mount the configuration as a volume.
$ docker run --name apache \
-v /path/to/my_vhost.conf:/vhosts/my_vhost.conf:ro \
bitnami/apache:latest
or using Docker Compose:
version: '2'
services:
apache:
image: 'bitnami/apache:latest'
ports:
- '80:8080'
- '443:8443'
volumes:
- /path/to/my_vhost.conf:/vhosts/my_vhost.conf:ro
[링크 : https://hub.docker.com/r/bitnami/apache/]
docker create -v /home/user/apache/conf:/etc/apache2 \ |
[링크 : https://forums.docker.com/t/mounting-etc-apache2-directory-from-system-to-container/40837/2]
+
$ docker help create$ docker help create -v, --volume list Bind mount a volume |
docker pid isolation (0) | 2019.07.10 |
---|---|
docker layer / AUFS (0) | 2019.07.10 |
docker apache reload (0) | 2019.07.10 |
docker detach (0) | 2019.07.10 |
docker login/logout (0) | 2019.07.10 |
docker container에 cp로 설정을 밀어넣고
외부에서 해당 컨테이너로 kill을 통해 USR1 시그널을 보내면 reload 하는 듯.
docker cp httpd.conf :/path/to/httpd.conf docker kill --signal="USR1" |
docker layer / AUFS (0) | 2019.07.10 |
---|---|
docker volume (0) | 2019.07.10 |
docker detach (0) | 2019.07.10 |
docker login/logout (0) | 2019.07.10 |
docker ps (0) | 2019.07.09 |
이건 순수하게 docker 기능
ctrl-p-q를 통해서 attach 한걸 떼어낼수 있다.
다만 VPN등을 통해 접속시에는 해당 시그널을 못 보내서 안되는 경우도 있다고 하니
그럴 경우에는 다른 시퀀스를 지정해주면 되려나?
You can detach from a container and leave it running using the CTRL-p CTRL-q key sequence. Override the detach sequenceIf you want, you can configure an override the Docker key sequence for detach. This is useful if the Docker default sequence conflicts with key sequence you use for other applications. There are two ways to define your own detach key sequence, as a per-container override or as a configuration property on your entire configuration. To override the sequence for an individual container, use the --detach-keys="<sequence>" flag with the docker attachcommand. The format of the <sequence> is either a letter [a-Z], or the ctrl- combined with any of the following:
These a, ctrl-a, X, or ctrl-\\ values are all examples of valid key sequences. To configure a different configuration default key sequence for all containers, see Configuration file section. |
[링크 : https://docs.docker.com/engine/reference/commandline/attach/]
[링크 : https://bestna.wordpress.com/2014/11/10/docker-container-run-이야기/]
docker volume (0) | 2019.07.10 |
---|---|
docker apache reload (0) | 2019.07.10 |
docker login/logout (0) | 2019.07.10 |
docker ps (0) | 2019.07.09 |
docker tag & push (0) | 2019.07.09 |
docker login은 docker registry에 로그인 하는 것이라고 한다.
docker hub 역시 docker registry일 뿐인건가?
$ sudo docker help Commands: login Log in to a Docker registry logout Log out from a Docker registry |
docker apache reload (0) | 2019.07.10 |
---|---|
docker detach (0) | 2019.07.10 |
docker ps (0) | 2019.07.09 |
docker tag & push (0) | 2019.07.09 |
docker cluster - swarm (0) | 2019.07.09 |