We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Dockerizing Python Error

Let's Dockerize the Python script!

Assignment

FROM debian:stable-slim
COPY main.py main.py
COPY books/ books/
CMD ["python", "main.py"]

Notice that we're moving the Python code (because it's not a compiled program) as well as the data files into the image.

docker build -t bookbot -f Dockerfile.py .
docker run bookbot

Ahh! You should get an error here.

Run and submit the CLI tests.