Launching Google Chrome on Docker container

Objective

Content of this Blog

Prerequisites

Project Understanding

hostname:D.S

Implementation: Dockerfile

FROM centos:latest
LABEL maintainer "Satyam Singh"

RUN dnf update -y
COPY google-chrome.repo /etc/yum.repos.d/
RUN yum install google-chrome-stable -y
ENTRYPOINT ["google-chrome","--no-sandbox"]

Implementation: Command used for building an image

docker build -t <image_name>:<version_tag> <path_to_Dockerfile>

Implementation: Command used to run Google Chrome within the container

docker run -it -e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix -- chrome <URL>

Output

Command Used
Command Output