Docker allows you to build containers using a Dockerfile. Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to build an image.
A Dockerfile consists of various commands and arguments listed successively to automatically perform actions on a base image in order to create a new one. It helps us to avoid issuing the command everytime while running container.
You can build the Docker image using one of the following two options:
Interactively launch a BASH shell under the Ubuntu Base image, install Apache and its dependencies, and then save the image.
Build the Docker image using Dockerfile with the web site included.
In this tutorial, I will explain how to create a Dockerfile, install the required Apache packages, add the necessary content and then build image.
Ubuntu Server 14.04 with Docker installed on your system.
Creating a Dockerfile
A Dockerfile is a text file that has a series of instructions to build an image. It supports a set of commands that we need to use in our Dockerfile.
There are several commands supported like FROM, CMD, ENTRYPOINT, VOLUME, ENV and many more. Each and every instruction set in the Dockerfile adds an additional layer to the image and then performs a commit.
Here, we will create a Dockerfile to create an image to install the Apache Web Server container.
To do this, we will need to create a file named Dockerfile using any text editor:
sudo nano Dockerfile
Add the following content which includes the commands and arguments for the Apache Web Server Container.
#Pull base image
RUN apt-get update -y && apt-get install apache2 apache2-utils -y
#Define default port
ENTRYPOINT [ "/usr/sbin/apache2ctl" ]
You can create an email email filters through your cPanel control panel which is where you manage your hosting account. Email filters can be set up to target specific word, subject, from or to. Emails that are filtered out can be sent to a different email, deleted, delivered to a...
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...