프로그램 사용/docker2019. 7. 10. 13:58

붙여넣기가 잘 안되서 짜증나네 -_-

아무튼, 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

Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]

Create a new container

Options:

  -v, --volume list                    Bind mount a volume
      --volume-driver string           Optional volume driver for the container
      --volumes-from list              Mount volumes from the specified container(s)

'프로그램 사용 > docker' 카테고리의 다른 글

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
Posted by 구차니