A Python dockerized hello fake time world
This repo spins up a simple Docker container running a Python (very simple) app and used the faketime library to fake the time
Fake time apporach and code based on https://brendonmatheson.com/2020/08/27/manipulating-time-inside-a-docker-container.html
It's highly recommended to install the (empty) dependencies in a virtual environment.
- Creating the virtual environment:
virtualenv venv- Activatingv the virtual environment:
source venv/bin/activate- Installing dependencies:
pip install -r requirements.txt- Running the code:
python main.py- Build the image:
docker build -t faketimeimage .- Run the container:
docker run --rm -it faketimeimage