-
Notifications
You must be signed in to change notification settings - Fork 10
Docker
bohyeon edited this page Dec 12, 2019
·
7 revisions
-
https://training.play-with-docker.com/
- μ΄ μ€ for Developer μ€μ΅μΌλ‘ κ³΅λΆ νλ € νμΌλ λͺ»ν¨
-
https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html
- μ°Έκ³ λΈλ‘κ·Έ (νκΈ)
- https://docs.docker.com/install/linux/docker-ce/ubuntu
- μ€μΉ μ€ μ°Έκ³
-
$ sudo apt-get install docker-ce=5:18.09.1~3-0~ubuntu-xenial docker-ce-cli=5:18.09.1~3-0~ubuntu-xenial containerd.io
λ¬Έμ μ€ 'Install a specific version using the version string from the second column, for example'μμλ μμκ°μ΄ μ λ ₯ν΄μ£Όλ©΄ λλ€.
-
OS requirements μ€
Disco 19.04, Cosmic 18.10, Bionic 18.04 (LTS), Xenial 16.04 (LTS)
λ€μ ubuntu version λ€μ λ³μΉμ΄λ€.
-
- λ©μΈ μ°Έκ³ :
- https://www.44bits.io/ko/post/almost-perfect-development-environment-with-docker-and-docker-compose#%EB%8F%84%EC%BB%A4-%EC%BB%B4%ED%8F%AC%EC%A6%88%EB%A1%9C-%EA%B0%9C%EB%B0%9C-%ED%99%98%EA%B2%BD-%EA%B5%AC%EC%84%B1%ED%95%98%EA%B8%B0
- docker + mongodb/redis/nginx μ€μ :
- docker + node js + nginx :
- μ€λͺ μ΄ μμΈν¨
- http://labs.brandi.co.kr/2018/05/25/kangww.html
- dockerμμ react buildνκΈ°
- https://github.com/connect-foundation/2019-01/wiki/Docker-mysql
-
https://github.com/connect-foundation/2019-01/wiki/docker-mysql-persistent-data
- docker-mysqlμ λ°μ΄ν° 보쑴
- volume μ€μ μ΄ μμ½λ€. μ ννκ² μμμΌν¨
- dockerλ₯Ό μ΄μ©ν΄ nCloud μλ²μ mysql μλ² μ€ννκΈ°
- lucasμ μ¬λΌμμλ Mysql μ€μ λ±λ μλμΌλ‘ μ μ©νλλ‘ Dockerfileμ λ§λ€μ΄μ£Όλ©΄ μ’μ κ² κ°λ€.
-
docker ps
μμps
? :process status
μ μ½μ. displays currently-running processes - port :
docker run -p 8080:80 name
- -p [Host]:[Container]
- νμΈ :
docker port name
- volume
-
version: '3' services: web: build: . ports: - "5000:5000" volumes: - .:/code environment: FLASK_ENV: development redis: image: "redis:alpine"
-
hostμ
.
directoryμ containerμ/code
directory λ₯Ό mount νλ€. -
volumesλ μ νμνκ°?
- λ‘컬μ λκ°λ₯Ό μ μ₯ν νμκ° μλ€κ³ νλ©΄ mountν νμκ° μλ€. κ³ λ³΄λ©΄ λ κ²μ΄λ€. (from μ§μ, almost 100% official)
- Volumes are easier to back up or migrate than bind mounts.
- In addition, volumes are often a better choice than persisting data in a containerβs writable layer, because a volume does not increase the size of the containers using it, and the volumeβs contents exist outside the lifecycle of a given container.
- μ°Έκ³ : https://docs.docker.com/compose/gettingstarted/#step-5-edit-the-compose-file-to-add-a-bind-mount
-
redisμμλ volumeμ΄ νμν κΉ?
- If persistence is enabled, data is stored in the VOLUME /data, which can be used with --volumes-from some-volume-container or -v /docker/host/dir:/data (see docs.docker volumes).
- μ°Έκ³ : https://hub.docker.com/_/redis
-
- docker- nginx - react : https://codechacha.com/ko/dockerizing-react-with-nginx/
- travis - docker - react : http://www.secmem.org/blog/2019/01/08/react-with-nginx-production/
- docker - mysql : https://blusky10.tistory.com/362
- docker image μ΄μ©ν local registry κ΅¬μΆ : https://waspro.tistory.com/532