Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/entelecheia/hyperfast-docker-template
A docker template that helps you jump start your docker container
https://github.com/entelecheia/hyperfast-docker-template
copier-template docker docker-compose docker-compose-template docker-template
Last synced: 17 days ago
JSON representation
A docker template that helps you jump start your docker container
- Host: GitHub
- URL: https://github.com/entelecheia/hyperfast-docker-template
- Owner: entelecheia
- License: mit
- Created: 2023-05-13T22:15:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T10:11:41.000Z (23 days ago)
- Last Synced: 2024-10-28T13:22:42.238Z (23 days ago)
- Topics: copier-template, docker, docker-compose, docker-compose-template, docker-template
- Language: Jinja
- Homepage: https://hyperfast-docker.entelecheia.ai/
- Size: 1020 KB
- Stars: 2
- Watchers: 1
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Hyperfast Docker Template
[![version-image]][release-url]
[![release-date-image]][release-url]
[![license-image]][license-url]Hyperfast Docker Template is a powerful tool that leverages copier to streamline the creation of new Docker projects. It simplifies and accelerates Docker configurations, fostering a highly efficient and user-friendly development experience.
- Documentation: [https://hyperfast-docker.entelecheia.ai][docs-url]
- GitHub: [https://github.com/entelecheia/hyperfast-docker-template][repo-url]Hyperfast Docker Template is an innovative project creation tool that merges the flexibility of Docker with the simplicity of Copier to optimize the project creation process. This tool allows developers to quickly and efficiently set up Docker projects, thereby significantly reducing the time and effort traditionally associated with this process.
By harnessing the power of Copier, Hyperfast Docker Template provides a user-friendly interface that developers can utilize to duplicate Docker projects with minimal hassle. It eradicates the need for extensive coding knowledge, making Docker more accessible to a wider range of users.
Furthermore, this tool employs a hyperfast approach to Docker project templating, ensuring that new projects are up and running in the quickest time possible. This speed does not compromise the quality or functionality of the Docker projects created, but instead enhances their performance, reliability, and scalability.
Hyperfast Docker Template also ensures consistency across Docker projects, as the use of a template guarantees that all projects conform to a standardized layout and configuration. This, in turn, enhances the overall workflow, as developers can familiarize themselves with a consistent project structure and configuration, leading to increased productivity and efficiency.
Whether you're an experienced developer or a novice just starting out, Hyperfast Docker Template is the ideal tool to fast-track your Docker project creation process, ensuring a seamless, efficient, and highly productive development experience.
## Prerequisites
- Docker
- Docker Compose
- NVIDIA Docker (for GPU support, Optional)## Setup
1. Use Copier to copy the template to your project directory:
```bash
copier copy --trust gh:entelecheia/hyperfast-docker-template path/to/destination
```2. Build the Docker image
Go to the project directory and run the following command:
```bash
make docker-build
```The `docker.base.env` file includes various configuration options and environment variables. The `docker-compose.base.yaml` file uses these variables to customize the behavior of the services. This is a common practice when you want to set different configurations for development, testing, and production environments. The `Dockerfile.base` file uses these variables to customize the Docker build. These files are automatically generated by Copier when you run the `copier copy` command.
3. Start the Docker container:
```bash
make docker-up
```This will start a Docker container with the image built in the previous step. The container will run a bash lauch script that starts the application.
## Usage
After starting the container, you can access the application at `localhost:`. By default, the port is set to `18888`.
You can also SSH into the container using the SSH port specified in `CONTAINER_HOST_SSH_PORT`. By default, the port is set to `2222`.
## Volumes
The `docker-compose.base.yaml` file specifies several volumes that bind mount directories on the host to directories in the container. These include the cache, the workspace directory, and the scripts directory. Changes made in these directories will persist across container restarts.
## Troubleshooting
If you encounter any issues with this setup, please check the following:
- Make sure Docker and Docker Compose are installed correctly.
- Make sure NVIDIA Docker is installed if you're planning to use GPU acceleration.
- Ensure the environment variables in the `docker.base.env` file are correctly set.
- Check the Docker and Docker Compose logs for any error messages.## Environment Variables
In Docker, environment variables can be used in the `docker-compose.base.yaml` file to customize the behavior of the services.
The `docker-compose` command has an `--env-file` argument, but it's used to set the environment variables for the services defined in the `docker-compose.yaml` file, not for the `docker-compose` command itself. The variables defined in the `--env-file` will not be substituted into the `docker-compose.yaml` file.
However, the environment variables we set in the `.docker/docker.base.env` file are used in the `docker-compose.base.yaml` file. For example, the `$BUILD_FROM` variable is used to set the base image for the Docker build. Therefore, we need to export these variables to the shell environment before running the `docker-compose` command.
This method also allows us to use shell commands in the variable definitions, like `"$(whoami)"` for the `USERNAME` variable, which wouldn't be possible if we used the `--env-file` argument. Shell commands in the `.env` file are not evaluated.
## Changelog
See the [CHANGELOG] for more information.
## Contributing
Contributions are welcome! Please see the [contributing guidelines] for more information.
## License
This project is released under the [MIT License][license-url].
[license-image]: https://img.shields.io/github/license/entelecheia/hyperfast-docker-template
[license-url]: https://github.com/entelecheia/hyperfast-docker-template/blob/main/LICENSE
[version-image]: https://img.shields.io/github/v/release/entelecheia/hyperfast-docker-template?sort=semver
[release-date-image]: https://img.shields.io/github/release-date/entelecheia/hyperfast-docker-template
[release-url]: https://github.com/entelecheia/hyperfast-docker-template/releases
[repo-url]: https://github.com/entelecheia/hyperfast-docker-template
[docs-url]: https://hyperfast-docker.entelecheia.ai
[changelog]: https://github.com/entelecheia/hyperfast-docker-template/blob/main/CHANGELOG.md
[contributing guidelines]: https://github.com/entelecheia/hyperfast-docker-template/blob/main/CONTRIBUTING.md