Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.38 KB

File metadata and controls

48 lines (33 loc) · 1.38 KB

Python Bookbot Container

A guided hands-on project completed as part of the "Learn Docker" course by Boot.dev. This repository serves as a learning artifact and demonstrates how to containerise a Python-based text analysis script from the ground up.

Purpose

The main goal of this project was to understand the internal dependencies of a runtime environment by:

  • building a Python 3.10 interpreter from source within a container
  • managing data dependencies (text files) inside a Docker image
  • practising the use of non-standard Dockerfile names with the -f flag

Key Features

  • Language: Python 3.10 (built from source)
  • Base Image: Debian (stable-slim)
  • Functionality: Analyses "Frankenstein" by Mary Shelley, providing word counts and character frequency reports.

Getting Started

1. Build the Docker image

NOTE: As this project uses a custom Dockerfile name (Dockerfile.py), the -f flag is required. The build may take several minutes as it compiles the Python interpreter.

docker build -t bookbot -f Dockerfile.py .

2.Run the container

docker run bookbot

3. Expected Output

--- Begin report of books/frankenstein.txt ---
77986 words found in the document

The 'e' character was found 46043 times
The 't' character was found 30365 times
The 'a' character was found 26743 times
...
--- End report ---