Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having issues getting this to work. When I perform the docker build -t command I get a name resolution error. This is my

I am having issues getting this to work. When I perform the docker build -t command I get a name resolution error.

This is my script so far

FROM python:3 WORKDIR ~/web2 COPY . ~/web2/www EXPOSE 8001 CMD ["python". "-m", "http.server", "8001"

These are the instructions

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/web2 with 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. Once you have assembled the necessary steps in your Dockerfile, execute the command to build it.

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_2

Step: 3

blur-text-image_3

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

=+How should we organize a book to maximize learning and interest

Answered: 1 week ago