{"id":15127662,"url":"https://github.com/pratikshinde55/docker-gui_container","last_synced_at":"2026-02-25T03:32:06.574Z","repository":{"id":250537515,"uuid":"834740769","full_name":"Pratikshinde55/Docker-GUI_Container","owner":"Pratikshinde55","description":"Setting Up and Accessing a GUI Container on EC2 Using VNC","archived":false,"fork":false,"pushed_at":"2024-09-25T12:57:16.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T19:18:48.227Z","etag":null,"topics":["docker","docker-container","docker-gui","tightvnc","vnc-viewer"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pratikshinde55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T08:05:45.000Z","updated_at":"2024-09-25T12:57:19.000Z","dependencies_parsed_at":"2024-10-31T10:43:47.799Z","dependency_job_id":"8e78f396-040a-4d74-b267-13cb56d73ab2","html_url":"https://github.com/Pratikshinde55/Docker-GUI_Container","commit_stats":null,"previous_names":["pratikshinde55/docker-gui_container"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pratikshinde55/Docker-GUI_Container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pratikshinde55%2FDocker-GUI_Container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pratikshinde55%2FDocker-GUI_Container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pratikshinde55%2FDocker-GUI_Container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pratikshinde55%2FDocker-GUI_Container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pratikshinde55","download_url":"https://codeload.github.com/Pratikshinde55/Docker-GUI_Container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pratikshinde55%2FDocker-GUI_Container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281601017,"owners_count":26528986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-container","docker-gui","tightvnc","vnc-viewer"],"created_at":"2024-09-26T02:05:15.203Z","updated_at":"2025-10-29T10:11:15.133Z","avatar_url":"https://github.com/Pratikshinde55.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-GUI_Container\n\n![image](https://github.com/user-attachments/assets/9a7633b6-6dc7-4a67-b566-2e3f2b47f46e)\n\n- Description:\n\nIn this task, we will set up a GUI container on an EC2 Ubuntu instance using Docker and access it remotely via VNC.\nThe process involves pulling and running a Docker image that provides an Ubuntu environment \nwith an XFCE desktop environment and a VNC server. We will then access this environment using TightVNC Viewer and a web browser.\n \n- Prerequisites:\n 1. AWS Account: (I use EC2 instance as OS for docker and AMI-ubuntu)\n    \n 2. Security Group Settings:\n     (Modify the security group associated with your EC2 instance to allow inbound traffic on the following ports:\n     Port 22 (SSH), Port 5901 (VNC), Port 6901 (noVNC),Port 80 (HTTP) ).\n    \n   ![Screenshot 2024-07-28 135712](https://github.com/user-attachments/assets/c0da6b3b-4739-40a0-9327-c3e490670d37)\n\n 3. Local Machine Setup:\n  (TightVNC Viewer installed on your local machine for accessing the VNC server).\n 4. Putty (SSH access to the EC2 instance ).\n\n\n### Step-1: [Install Docker and Start Docker services]\n \n    sudo apt-get update\n    \nInstall Docker commad for ubuntu:   \n\n    sudo apt-get install -y docker.io\n    \nStart Docker service command:\n\n    sudo systemctl start docker \n\n\n### Step-2: [Launch Container using image which support GUI]\n\n- Note:\n  \n The \"consol/ubuntu-xfce-vnc\" Docker image is designed to provide a lightweight, easy-to-use VNC (Virtual Network Computing) \n server environment running on an Ubuntu base with the Xfce desktop environment. This image allows you to run GUI applications \n within a container and access them remotely via a VNC client.\n\n    sudo docker pull consol/ubuntu-xfce-vnc\n\nLanuch container in detached Mode and expose:\n\n    sudo docker run -d --name=pratik1 -p 5901:5901 -p 6901:6901 -e VNC_PASSWORD=pratik consol/ubuntu-xfce-vnc\n\nhere,\n \n **-d: Run the container in detached mode.**\n    \n **-p 5901:5901: Map port 5901 of the container to port 5901 of the host (VNC access).**\n    \n **-p 6901:6901: Map port 6901 of the container to port 6901 of the host (web-based VNC access).**\n\n**-e environmental variables** \n    \nNow check container logs and we get image build details:\n\n    sudo docker logs pratik1\n\n- Note:\n    \nwe can try to connect container from outside (browser) world.\n\nhere show error while connecting to container by HTTP (http://52.90.226.27:6901/?password=pratik) we write password then also unable to connect -\n\n![image](https://github.com/user-attachments/assets/070c9471-cc3c-4b4a-8d72-2ecea5747da7)\n\n#### TightVNC Viewer:\n[TightVNC-download-link](https://www.tightvnc.com/download.php)\n  \n*TightVNC is a remote desktop software that allows you to see and control a remote computer's desktop. It uses the RFB (Remote FrameBuffer) protocol\nand is an improved version of the standard VNC (Virtual Network Computing) software.*\n\nNow using TightVNC viewer for GUI container:\n\nFill public Ip of EC2 and port no. --\u003e\u003e (52.90.226.27:5901)\n\n![image](https://github.com/user-attachments/assets/99d21477-3f4d-4623-a5cd-3ad9783d029a)\n\nWhile fill password also unble to connect GUI container :\n\n![image](https://github.com/user-attachments/assets/95bf9c5d-c26a-4136-87bd-49982e444545)\n\n- Note : (Authentication Failure)\n\nI can manually reset the VNC password by attaching to the running container and using the \"vncpasswd\" command.\n\n    sudo docker exec -it pratik1 bash\n\nSet new VNC password inside the Container cmd:\n\n    vncpasswd\n\nAfter resetting the password, restart the VNC server within the container:\n\n    vncserver -kill :1\n    vncserver :1\n\n![image](https://github.com/user-attachments/assets/7373b6c0-08be-4bae-9c53-6a6002dd785c)\n\n### Step-3: [On Browser]\nNow again check on Browser with newly saved password (newpassowrd - pratik55)\n\npublic IP of EC2 : port no (http://52.90.226.27:6901/?password=pratik55)\n\n![image](https://github.com/user-attachments/assets/ff95071c-e1d4-4279-a63e-a0788b8526f8)\n\n\n- check GUI Container from TightVNC viewer:\n\nfill new password \n\n![Screenshot 2024-07-28 141953](https://github.com/user-attachments/assets/b95063a9-2775-44f1-839e-8d143c3545e3)\n\n    \n## Summary \n\n- Docker Setup on EC2 Instance:\n\n  Install Docker on your EC2 instance.\n  \n  Pull a Docker image capable of running a GUI application with VNC support.\n  \n- Running the Docker Container:\n\n  Start the Docker container with ports 5901 and 6901 exposed for VNC and noVNC access.\n \n  Set a VNC password.\n \n- Connecting via TightVNC Viewer:\n\n  Use TightVNC Viewer on your local machine to connect to the VNC server running in the Docker container on the EC2 instance.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpratikshinde55%2Fdocker-gui_container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpratikshinde55%2Fdocker-gui_container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpratikshinde55%2Fdocker-gui_container/lists"}