Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 : create an image to serve a static file. Some of your company's applications include simple static files to be served. you would

Part 1: create an image to serve a static file.
Some of your company's applications include simple static files to be served. you would like to create separate containers to serve static content. for testing, you can use the Python http server in the standard library, which can be run using "python -m http server -d "to serve the files in listening on the given port.
Create a new folder /home/user/web2with a Dockerfile and a subfolder www containing a static file to be served. Write the Dockerfile so that it includes the default Python http server command to run for the web server, using port 8001.One you have assembled the necessary steps in your Dockerfile, execute the command to build it.
Make a screen capture showing the successful build of the web2image.
Now that your image is built, create and run a container based on it.you may do this in several steps, or use the appropriate docker command to accomplish the task in a single step. Ensure that you connect port 8001of the docker container to port 8001on the host. also ensure that you map the www subfolder you created to the directory in the container that you are serving your static file from. IN firefox, navigate to localhost 8001to show the directory listing on port 8001,which should contain your static file.
Make a screen capture showing the directory listing served on port 8001
part 2: add the static service to the Docker Compose File.
Any static web services should be started as a part of the multi-container application. Update the file docker-compose.yml of your company's Django-based application to use the new web2image created in the previous part. This new service should be named web2and should be exposed on port 8080of the Docker host.
Once you have updated the docker-compose.yml file, use docker compost to start the multi-container Django application. The output or your command should indicate all three containers (db,web and web2)were created.
make a screen capture showing the creation of the web, web2,and db containers in the docker compose output.
IN firefox, navigate to your wb2service running on port 8080to display a directory listing that contains the file you created in the previous part.
Make a screen capture showing the directory listing served on port 8080
I need step-by-step instructions to do this in the Jones and Bartlett lab setting.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

3031001257, 978-3031001253

More Books

Students also viewed these Databases questions

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

Explain in detail the developing and developed economy of India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = X 52+7 - 1)(x+2) dx

Answered: 1 week ago

Question

What is gravity?

Answered: 1 week ago

Question

What is the Big Bang Theory?

Answered: 1 week ago