This is a small repository used to quickly test Python scripts and packages in a Dockerized environment.
Service | Image | Container |
---|---|---|
testpy_service | python:3.8-alpine | testpy |
- Add Python packages to the
requirements.txt
file. - Build/rebuild the image and start the
testpy
container by typing the commandmake build
. - Add code to
main.py
. - Test code by typing the command
make run
. It will executemain.py
in thetestpy
container.
make list
: List all local images and containers.make exec
: Enter thetestpy
container.make clean
: Cleanup and remove ALL local images and containers.make list_packages
: List the Python packages installed in thetestpy
container.