#4. Docker Desktop 설치
Docker Desktop 설치
윈도우 10 pro 이상, 맥(무관)
튜토리얼 스킵
제어판->프로그램삭제-> Windows 기능 -> Hyper-V 기능 비활성화되어야함.. (윈도우내 안드로이드같은 가상화 어플 작동안됨) 같이 사용할수 없음.
도커 설치 테스트
CDM 창에서
docker run -d -p 88:80 docker/getting-started
우분트를 설치하고, Nginx 를설치하고 외부 88 포트 내부80 포트로 연결
화면에서 88로 접속하면
명령어를 쳐볼수 있다
docker-compose download
Docker/docker-compose 설치하기
docker-compose : https://docs.docker.com/compose/install/standalone/
Install Compose standalone
How to install Docker Compose - Other Scenarios
docs.docker.com
docker-compose 란?
여러개의 컨테이너를 하나의 서비스로 정의해 컨테이너의 묶음으로 관리할 수 있는 작업 환경을 제공하는 관리 도구입니다.
리눅스 명령어로 들어가서..
curl -SL https://github.com/docker/compose/releases/download/v2.30.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
퍼미션 에러시 sudo
Test the installation.
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
도커 허브 가입
화원가입이후
도커허브사이트로 이동
기본명령어
docker ps : 실행중인 컨테이너
docker images 다운받은 도커이미지
도커 아키텍처 작동원리
systemctl list-unit-files | grep docker
systemctl list-unit-files | grep docker
1. 도커이미지 다운로드
2. 도커이미지 마운트 , 도커컨터이너에 등록 , 도커컨터이너 실행 -> 인스턴스
이미지 삭제하려면 도커컨테이너에서 마운트에서 해제후 삭제
The command you just ran
Congratulations! You have started the container for this tutorial! Let's first explain the command that you just ran. In case you forgot, here's the command:
docker run -d -p 80:80 docker/getting-started
You'll notice a few flags being used. Here's some more info on them:
- -d - run the container in detached mode (in the background)
- -p 80:80 - map port 80 of the host to port 80 in the container
- docker/getting-started - the image to use
Pro tip
You can combine single character flags to shorten the full command. As an example, the command above could be written as:
docker run -dp 80:80 docker/getting-started