wymillerlinux / DockerDemoPython

A Docker Demo for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DockerDemoPython

A Docker Demo for the Python 3.6 image on Docker Hub. Feel free to follow along. I have wrote this little Python app for fictional medical purposes. It takes name, age, height, weight and saves it to a JSON file and spits output at you. Kind of lame. Anywho, let's begin.

Installation

Please note these installation instructions are for Ubuntu Linux 16.04 or higher. Email me if you have a different distribution or operating system.

First, you have to install git.
sudo apt install git

Also, you have to have Docker.
snap install docker
sudo apt install docker.io

Next, build the image with Docker.
docker build -t demo02 .

You call your Docker image however you like by replacing demo02 with anything.
If you get a permission denied error, add your user to the Docker group.
sudo usermod -aG docker wyatt
Replace wyatt with your user.

Running

Finally, run your image with the flags -it.
docker run -it demo02

Follow the on-screen prompts.

Troubleshooting

Email me with the locally downloaded repo and we'll have a disscusion.

About

A Docker Demo for Python

License:MIT License


Languages

Language:Python 77.1%Language:Dockerfile 22.9%