Hosting Apache2 in a Ubuntu Container
Hey All, The purpose of this blog is to demonstrate how to host a web server service inside a container using a docker file. The application can be accessed from the browser by exposing the port. Let's get into the content and learn..... Table of Content : Prerequisites. Setting up the Environment. Creating Dockerfile and explanation. Build a docker image and run the docker container. Pushing the docker image to the repository. Prerequisites: Ubuntu Instance with the inbound rule of exposing port 80 to host the application. Docker engine should be installed in the instance. Setting up the Environment: Launch an EC2 instance from AWS console management with the inbound rule exposing port 80 of the host machine. After launching the EC2 instance, log into the host machine and follow the below commands to update and install the required services. sudo apt update sudo apt install docker.io Click to Copy Creating th...