This Docker image sets up an Apache web server hosting a project named "Marketing" based on a template from www.tooplate.com.
The Dockerfile consists of two stages:
- Uses the
ubuntu:latest
base image to build the project. - Installs
wget
andunzip
. - Downloads the template ZIP file from https://www.tooplate.com/zip-templates/2128_tween_agency.zip.
- Extracts the template contents, compresses them into a tar.gz file, and moves it to
/root/tween.tgz
.
- Uses the
ubuntu:latest
base image again for the final image. - Installs Apache2, Git, and wget.
- Copies the
tween.tgz
file from the BUILD_IMAGE to/var/www/html/
. - Extracts the contents of
tween.tgz
in/var/www/html/
. - Starts the Apache2 web server, serving the Marketing project.
To build the Docker image, follow these steps:
-
Save the provided Dockerfile to a directory on your local machine.
-
Open a terminal or command prompt and navigate to the directory containing the Dockerfile.
-
Run the following command to build the image:
docker build -t marketing_project .