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:latestbase image to build the project. - Installs
wgetandunzip. - 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:latestbase image again for the final image. - Installs Apache2, Git, and wget.
- Copies the
tween.tgzfile from the BUILD_IMAGE to/var/www/html/. - Extracts the contents of
tween.tgzin/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 .