Skip to content

srikashyap24/Random-Number-Generator-with-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 Random Number Generator with Docker

This project demonstrates how to run a Python script interactively inside a Docker container. The script generates a random number between a user-defined range.

πŸ“ Files Included

  • rng.py – Python script to generate a random number.
  • Dockerfile – Docker configuration to run the script.

🐳 Requirements

  • Docker

πŸš€ How to Use

  1. Clone the repository:

    git clone https://github.com/srikashyap24/Random-Number-Generator-with-Docker cd Random-Number-Generator-with-Docker

  2. Build the Docker image:

    docker build -t rng-app .

  3. Run the container interactively:

    docker run -it rng-app

You will be asked to enter a minimum and maximum number, and it will print a random number in that range.

πŸ“Œ Example Output

Please enter the min number: 5
Please enter the max number: 15
9

πŸ“š What I Learned

  • Writing a Python script with randint
  • Creating and using a Dockerfile
  • Running interactive containers using Docker

πŸ“¦ Purpose

A simple exercise to understand interactive container usage with Docker and Python.


πŸ› οΈ Built with Python & Docker
πŸŽ“ For learning and practice

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published