Template for building a Docker image using Docker Compose.
This sets up a basic Python 3.10 image which installs the requirements.txt
file and runs the dockerfile_python_template/main.py
file. The default behavior is that all the files are copied into the image on build. The image is able to run without the volume mounted; however, when a volume is mounted according to the Compose configuration, the files in the image are overwritten.
- Start Docker
- Start the image with
docker-compose up --build
. - Thats it.
- Install build tools with
pip install build
. - Build the package with
python -m build
. - Thats it.
- Install the package with
pip install .
. - Thats it.