Template for packaging python scripts in a container
- Copy these contents to a new repo.
- Replace the
hello
directory with a new python package that implements your desired functionality. - Update the tests directory to exercise important functionality in your python package.
- Update entrypoint.py to call your new python package.
- Don't skip the "writing tests" step
- Allow configurable parameters to be set with environment variables
This will also run the tests.
podman build -t hello-python .
or
docker build -t hello-python .
podman run hello-python:latest
or
docker run hello-python:latest
podman run -e MESSAGE='¡Hola Mundo!' hello-python:latest
or
docker run -e MESSAGE='¡Hola Mundo!' hello-python:latest
Submit a POST to
https://api.github.com/repos/CUB-OIT-PE/hello-python/dispatches
with a body of
{
"event_type": "bump",
"client_payload": {}
}
or { "event_type": "build", "client_payload": {} }