Posts

Showing posts from February, 2019

Simple apache service on top of Docker - Basic commands - Example

We can get base images form the docker hub repository Tip: you can make customer images in docker hub (you will have to log in to docker-hub and then push the image you customised) We can download the docker image from the centre repository. Let’s download a ubuntu latest image from the repository. docker pull ubuntu Then, you can see the image by typing in terminal, docker images ubuntu After, If you want to run the docker image you can execute following command in the terminal docker container run -it web-application -p 80:80 -d ubuntu Here, the Ubuntu image is started with assigned name “web-application” and port forward is done with assigning 80:80 as host port : container port Then you will see the container id under when it is started. After, let’s install a apache service in the ubuntu container we created. To log in to the container, type docker exec -it web-application bash And then you will be in the container.Now we are going to install apache  apt i