Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

burlistic/docker-python-helloworld

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-python-helloworld

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

Steps to run directly the python code

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

Steps to run the python code withing a Docker container

  • Build the image:
docker build -t faketimeimage .
  • Run the container:
docker run --rm -it faketimeimage

About

A Python dockerized hello fake time example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 89.2%
  • Python 10.8%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.