vnc Docker에 연결
                                            
                                                
                                                
                                                
                                                
                                                
                                                 4601 단어  Docker
                    
목표 
Docker에 연결된 메모입니다.
Dockerhub에서 이미지 확인 
아래 내용을 참고하도록 허락해 주십시오
queeno/ubuntu-desktop 
Ubuntu Desktop Dockerfile
Docker container for Ubuntu 16.04 including ubuntu-desktop and vncserver.
Dockerhub에서 이미지를 시작하고 vnc 연결 
docker rundocker run -p 5901:5901 queeno/ubuntu-desktop
...
16/05/20 15:06:31 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
16/05/20 15:06:31 Listening for VNC connections on TCP port 5901
...
그리고 vnc를 연결합니다.
vnc://:5901 via VNC client.
The VNC password is password.
Mac의 경우 Finder → 이동 → 서버에 연결 →vnc://localhost:5901연결
 
 
 
 
연결됨
 
 
제가 xeyes 명령으로 봤어요.
 
 
Dockerfile build에서 컨테이너 시작 
시작된 docker 이미지의 Dockerfile은 다음과 같습니다.
queeno/docker-ubuntu-desktop 
git clone을 통해 얻기$ git clone https://github.com/queeno/docker-ubuntu-desktop
$ cd docker-ubuntu-desktop
문서 파일 확인
DockerfileFROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends ubuntu-desktop && \
    apt-get install -y gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal && \
    apt-get install -y tightvncserver && \
    mkdir /root/.vnc
ADD xstartup /root/.vnc/xstartup
ADD passwd /root/.vnc/passwd
RUN chmod 600 /root/.vnc/passwd
CMD /usr/bin/vncserver :1 -geometry 1280x800 -depth 24 && tail -f /root/.vnc/*:1.log
EXPOSE 5901
명령줄에서 실행하는 것이 번거롭기 때문에docker-compose.준비yml
docker-compose.ymlversion: '3.3'
services:
    test:
        build:
          context: .
          dockerfile: Dockerfile
        container_name: ubuntu1604-desktop-test
        image: 'ubuntu1604-desktop-test:latest'
        ports:
          - 5901:5901
        stdin_open: true
그리고dockerbuild&dockerrun을 실행합니다$ docker-compose build
$ docker-compose run
...
ubuntu1604-desktop-test | 16/05/20 15:35:50 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
ubuntu1604-desktop-test | 16/05/20 15:35:50 Listening for VNC connections on TCP port 5901
...
vnc 로그인 연결 가능 여부 다시 확인
vnc://:5901 via VNC client.
 
 
참고 자료 
Docker를 통해 Linux 데스크톱 환경을 쉽게 시도해 보십시오! 
queeno/ubuntu-desktop 
queeno/docker-ubuntu-desktop
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(vnc Docker에 연결), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/seigot/items/eef9da58c74eb080617b
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
아래 내용을 참고하도록 허락해 주십시오
queeno/ubuntu-desktop
Ubuntu Desktop Dockerfile
Docker container for Ubuntu 16.04 including ubuntu-desktop and vncserver.
Dockerhub에서 이미지를 시작하고 vnc 연결 
docker rundocker run -p 5901:5901 queeno/ubuntu-desktop
...
16/05/20 15:06:31 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
16/05/20 15:06:31 Listening for VNC connections on TCP port 5901
...
그리고 vnc를 연결합니다.
vnc://:5901 via VNC client.
The VNC password is password.
Mac의 경우 Finder → 이동 → 서버에 연결 →vnc://localhost:5901연결
 
 
 
 
연결됨
 
 
제가 xeyes 명령으로 봤어요.
 
 
Dockerfile build에서 컨테이너 시작 
시작된 docker 이미지의 Dockerfile은 다음과 같습니다.
queeno/docker-ubuntu-desktop 
git clone을 통해 얻기$ git clone https://github.com/queeno/docker-ubuntu-desktop
$ cd docker-ubuntu-desktop
문서 파일 확인
DockerfileFROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends ubuntu-desktop && \
    apt-get install -y gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal && \
    apt-get install -y tightvncserver && \
    mkdir /root/.vnc
ADD xstartup /root/.vnc/xstartup
ADD passwd /root/.vnc/passwd
RUN chmod 600 /root/.vnc/passwd
CMD /usr/bin/vncserver :1 -geometry 1280x800 -depth 24 && tail -f /root/.vnc/*:1.log
EXPOSE 5901
명령줄에서 실행하는 것이 번거롭기 때문에docker-compose.준비yml
docker-compose.ymlversion: '3.3'
services:
    test:
        build:
          context: .
          dockerfile: Dockerfile
        container_name: ubuntu1604-desktop-test
        image: 'ubuntu1604-desktop-test:latest'
        ports:
          - 5901:5901
        stdin_open: true
그리고dockerbuild&dockerrun을 실행합니다$ docker-compose build
$ docker-compose run
...
ubuntu1604-desktop-test | 16/05/20 15:35:50 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
ubuntu1604-desktop-test | 16/05/20 15:35:50 Listening for VNC connections on TCP port 5901
...
vnc 로그인 연결 가능 여부 다시 확인
vnc://:5901 via VNC client.
 
 
참고 자료 
Docker를 통해 Linux 데스크톱 환경을 쉽게 시도해 보십시오! 
queeno/ubuntu-desktop 
queeno/docker-ubuntu-desktop
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(vnc Docker에 연결), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/seigot/items/eef9da58c74eb080617b
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
docker run -p 5901:5901 queeno/ubuntu-desktop
...
16/05/20 15:06:31 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
16/05/20 15:06:31 Listening for VNC connections on TCP port 5901
...
시작된 docker 이미지의 Dockerfile은 다음과 같습니다.
queeno/docker-ubuntu-desktop
git clone을 통해 얻기
$ git clone https://github.com/queeno/docker-ubuntu-desktop
$ cd docker-ubuntu-desktop
Dockerfile
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends ubuntu-desktop && \
    apt-get install -y gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal && \
    apt-get install -y tightvncserver && \
    mkdir /root/.vnc
ADD xstartup /root/.vnc/xstartup
ADD passwd /root/.vnc/passwd
RUN chmod 600 /root/.vnc/passwd
CMD /usr/bin/vncserver :1 -geometry 1280x800 -depth 24 && tail -f /root/.vnc/*:1.log
EXPOSE 5901
docker-compose.yml
version: '3.3'
services:
    test:
        build:
          context: .
          dockerfile: Dockerfile
        container_name: ubuntu1604-desktop-test
        image: 'ubuntu1604-desktop-test:latest'
        ports:
          - 5901:5901
        stdin_open: true
$ docker-compose build
$ docker-compose run
...
ubuntu1604-desktop-test | 16/05/20 15:35:50 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
ubuntu1604-desktop-test | 16/05/20 15:35:50 Listening for VNC connections on TCP port 5901
...
vnc://:5901 via VNC client.
 
 참고 자료 
Docker를 통해 Linux 데스크톱 환경을 쉽게 시도해 보십시오! 
queeno/ubuntu-desktop 
queeno/docker-ubuntu-desktop
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(vnc Docker에 연결), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/seigot/items/eef9da58c74eb080617b
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
Reference
이 문제에 관하여(vnc Docker에 연결), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/seigot/items/eef9da58c74eb080617b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)