Welcome to Fred's Docker container setup guide for a standard Python project. This README will guide you through the process of setting up your Docker environment, starting the container, and managing releases efficiently.
Follow these simple steps to get your Docker container up and running.
First, create a .env file from the provided template:
cp env.template .env
Once copied, open the .env file and modify the contents to suit your project's needs.
To build or rebuild the Docker container with minimal hassle, use the lazy_start.sh script:
bash lazy_start.sh
NOTE: If this is your first time running Docker commands, ensure that your user account is added to the Docker user group to avoid permission issues.
Alternatively, you can use standard Docker commands like:
docker compose up
To view the logs of your container, use the following command, replacing <your_container_name> and <number_of_logs_display> with appropriate values:
docker logs <your_container_name> -n <number_of_logs_display> -f
This will display a live feed of your container's logs.
When you're ready to release your Docker image, follow these steps.
Ensure all development code is merged onto the master branch, either in your local or remote repository.
To build your release Docker images, execute:
bash one_key_release.sh
Check that your Docker images are correctly built and listed:
docker image ls
This command will display all current Docker images, including your newly built ones.
By following these instructions, you can efficiently manage a Docker container for your Python projects. Enjoy your streamlined development and release process! This version of the README is structured to be more user-friendly, especially for beginners, with clear instructions and explanations at each step.