How to configure from scratch vnc server on running docker container and access the gui from remote window machine

7/3/2019

i have a running docker container, the image its derived from does not have the vnc configured.

I want to configure the vnc on this container and want to access it from my window machine. Is it possible.

I have already gone through so many links but no one really have the details. I do not want to use the images from docker hub since i am creating my own docker image. But i am stuck with vnc as don't know how to proceed with that. Before configuring the vnc in docker file, i want to check it on a running container.

If someone can describe the steps to run the vnc on running container and way to access it from my local window machine using vnc viewer , that will be awesome.

Docker File:

FROM centos:7

RUN yum -y install java

# Install latest version of chrome 
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm &&  yum -y install google-chrome-stable_current_x86_64.rpm

#Install chrome driver 2.40.565383
RUN mkdir /Check/Testfolder/gecko && sudo -S wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip -O /Check/Testfolder/gecko/chromedriver_linux64.zip 

RUN unzip /Check/Testfolder/gecko/chromedriver_linux64.zip -d /usr/bin/ 

#Set XVFB for browser display
RUN yum -y install Xvfb

ENV DISPLAY :99

RUN Xvfb :99 -screen 1200x1080x24 &> /dev/null &

#Install maven
RUN  yum -y install maven
-- J.vik
docker
kubernetes
vnc-server
vnc-viewer

0 Answers