WSL + Ubuntu에서 docker-compose 작동
확인 환경
📀WSL with Ubuntu 20.04LTS
📀WSL with Ubuntu 18.04LTS
 docker 설치
 공식 와 같이 Docker CE를 설치합니다.
Docker의 공식 GPG 키를 추가합니다.
$ sudo apt-get update
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
키의 fingerprint(지문)가 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88로 표시되는지 확인합니다.
$ sudo apt-key fingerprint 0EBFCD88
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <[email protected]>
sub   rsa4096 2017-02-22 [S]
Docker stable(안정 버전) 리포지토리를 설정합니다.
$ sudo -E add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Docker CE를 설치합니다.
$ sudo apt-get install docker-ce
 docker-compose 설치
docker-compose는 여러 컨테이너를 사용하는 Docker 응용 프로그램을 정의하고 실행하는 도구입니다.
sudo -i
curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
※ /download/ 뒤에 오는 버전 지정은 공식 사이트 을 확인하신 후 최신 버전으로 변경해 주십시오.
 Docker 시작
Docker 서비스를 시작합니다. 이제 Docker 컨테이너를 이동할 수 있습니다.
$ sudo service docker start
 동작 확인
👀 다음 명령으로 확인합니다.
$ curl -O https://keinos.github.io/hello-docker-compose/docker-compose.yml
$ docker-compose up
성공하면 다음과 같이 표시됩니다.
Starting hello_hello_1 ... done
Attaching to hello_hello_1
hello_1  |
hello_1  | Hello from Docker!
hello_1  | This message shows that your installation appears to be working correctly.
hello_1  |
hello_1  | To generate this message, Docker took the following steps:
hello_1  |  1. The Docker client contacted the Docker daemon.
hello_1  |  2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello_1  |     (amd64)
hello_1  |  3. The Docker daemon created a new container from that image which runs the
hello_1  |     executable that produces the output you are currently reading.
hello_1  |  4. The Docker daemon streamed that output to the Docker client, which sent it
hello_1  |     to your terminal.
hello_1  |
hello_1  | To try something more ambitious, you can run an Ubuntu container with:
hello_1  |  $ docker run -it ubuntu bash
hello_1  |
hello_1  | Share images, automate workflows, and more with a free Docker ID:
hello_1  |  https://hub.docker.com/
hello_1  |
hello_1  | For more examples and ideas, visit:
hello_1  |  https://docs.docker.com/get-started/
hello_1  |
hello_hello_1 exited with code 0
 참고
 WSL로 docker 설치에서 docker-compose로 이동
 가장 간단한 docker-compose.yml의 hello-world
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(WSL + Ubuntu에서 docker-compose 작동), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/quzq/items/56218b6006d162357a62
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
공식 와 같이 Docker CE를 설치합니다.
Docker의 공식 GPG 키를 추가합니다.
$ sudo apt-get update
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
키의 fingerprint(지문)가
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88로 표시되는지 확인합니다.$ sudo apt-key fingerprint 0EBFCD88
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <[email protected]>
sub   rsa4096 2017-02-22 [S]
Docker stable(안정 버전) 리포지토리를 설정합니다.
$ sudo -E add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Docker CE를 설치합니다.
$ sudo apt-get install docker-ce
docker-compose 설치
docker-compose는 여러 컨테이너를 사용하는 Docker 응용 프로그램을 정의하고 실행하는 도구입니다.
sudo -i
curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
※ /download/ 뒤에 오는 버전 지정은 공식 사이트 을 확인하신 후 최신 버전으로 변경해 주십시오.
 Docker 시작
Docker 서비스를 시작합니다. 이제 Docker 컨테이너를 이동할 수 있습니다.
$ sudo service docker start
 동작 확인
👀 다음 명령으로 확인합니다.
$ curl -O https://keinos.github.io/hello-docker-compose/docker-compose.yml
$ docker-compose up
성공하면 다음과 같이 표시됩니다.
Starting hello_hello_1 ... done
Attaching to hello_hello_1
hello_1  |
hello_1  | Hello from Docker!
hello_1  | This message shows that your installation appears to be working correctly.
hello_1  |
hello_1  | To generate this message, Docker took the following steps:
hello_1  |  1. The Docker client contacted the Docker daemon.
hello_1  |  2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello_1  |     (amd64)
hello_1  |  3. The Docker daemon created a new container from that image which runs the
hello_1  |     executable that produces the output you are currently reading.
hello_1  |  4. The Docker daemon streamed that output to the Docker client, which sent it
hello_1  |     to your terminal.
hello_1  |
hello_1  | To try something more ambitious, you can run an Ubuntu container with:
hello_1  |  $ docker run -it ubuntu bash
hello_1  |
hello_1  | Share images, automate workflows, and more with a free Docker ID:
hello_1  |  https://hub.docker.com/
hello_1  |
hello_1  | For more examples and ideas, visit:
hello_1  |  https://docs.docker.com/get-started/
hello_1  |
hello_hello_1 exited with code 0
 참고
 WSL로 docker 설치에서 docker-compose로 이동
 가장 간단한 docker-compose.yml의 hello-world
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(WSL + Ubuntu에서 docker-compose 작동), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/quzq/items/56218b6006d162357a62
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
sudo -i
curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Docker 서비스를 시작합니다. 이제 Docker 컨테이너를 이동할 수 있습니다.
$ sudo service docker start
동작 확인
👀 다음 명령으로 확인합니다.
$ curl -O https://keinos.github.io/hello-docker-compose/docker-compose.yml
$ docker-compose up
성공하면 다음과 같이 표시됩니다.
Starting hello_hello_1 ... done
Attaching to hello_hello_1
hello_1  |
hello_1  | Hello from Docker!
hello_1  | This message shows that your installation appears to be working correctly.
hello_1  |
hello_1  | To generate this message, Docker took the following steps:
hello_1  |  1. The Docker client contacted the Docker daemon.
hello_1  |  2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello_1  |     (amd64)
hello_1  |  3. The Docker daemon created a new container from that image which runs the
hello_1  |     executable that produces the output you are currently reading.
hello_1  |  4. The Docker daemon streamed that output to the Docker client, which sent it
hello_1  |     to your terminal.
hello_1  |
hello_1  | To try something more ambitious, you can run an Ubuntu container with:
hello_1  |  $ docker run -it ubuntu bash
hello_1  |
hello_1  | Share images, automate workflows, and more with a free Docker ID:
hello_1  |  https://hub.docker.com/
hello_1  |
hello_1  | For more examples and ideas, visit:
hello_1  |  https://docs.docker.com/get-started/
hello_1  |
hello_hello_1 exited with code 0
 참고
 WSL로 docker 설치에서 docker-compose로 이동
 가장 간단한 docker-compose.yml의 hello-world
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(WSL + Ubuntu에서 docker-compose 작동), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/quzq/items/56218b6006d162357a62
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
$ curl -O https://keinos.github.io/hello-docker-compose/docker-compose.yml
$ docker-compose up
Starting hello_hello_1 ... done
Attaching to hello_hello_1
hello_1  |
hello_1  | Hello from Docker!
hello_1  | This message shows that your installation appears to be working correctly.
hello_1  |
hello_1  | To generate this message, Docker took the following steps:
hello_1  |  1. The Docker client contacted the Docker daemon.
hello_1  |  2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello_1  |     (amd64)
hello_1  |  3. The Docker daemon created a new container from that image which runs the
hello_1  |     executable that produces the output you are currently reading.
hello_1  |  4. The Docker daemon streamed that output to the Docker client, which sent it
hello_1  |     to your terminal.
hello_1  |
hello_1  | To try something more ambitious, you can run an Ubuntu container with:
hello_1  |  $ docker run -it ubuntu bash
hello_1  |
hello_1  | Share images, automate workflows, and more with a free Docker ID:
hello_1  |  https://hub.docker.com/
hello_1  |
hello_1  | For more examples and ideas, visit:
hello_1  |  https://docs.docker.com/get-started/
hello_1  |
hello_hello_1 exited with code 0
WSL로 docker 설치에서 docker-compose로 이동
가장 간단한 docker-compose.yml의 hello-world
Reference
이 문제에 관하여(WSL + Ubuntu에서 docker-compose 작동), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/quzq/items/56218b6006d162357a62텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)