Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpcaparas/dockerfiles
A collection of Dockerfiles mostly for personal learning; then passed along CI/CD pipelines.
https://github.com/jpcaparas/dockerfiles
Last synced: about 10 hours ago
JSON representation
A collection of Dockerfiles mostly for personal learning; then passed along CI/CD pipelines.
- Host: GitHub
- URL: https://github.com/jpcaparas/dockerfiles
- Owner: jpcaparas
- Created: 2024-06-26T06:37:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-26T11:16:39.000Z (7 months ago)
- Last Synced: 2024-06-27T09:35:13.920Z (7 months ago)
- Language: Shell
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Image Builder
This project contains a script for building Docker images in parallel using GNU `parallel`. The script finds all Dockerfiles in the project, builds a Docker image for each one, and tags the image with the DockerHub username and the relative path of the Dockerfile.
## Prerequisites
- Docker
- GNU `parallel`.## Installation
1. Install Docker: Follow the instructions on the [official Docker website](https://docs.docker.com/get-docker/).
2. Install GNU `parallel`: On Ubuntu, you can install it with `sudo apt-get install parallel`.## Usage
1. Set your Docker Hub username in the `build.sh` script.
2. Run the `build.sh` script with `bash build.sh`.The script will find all Dockerfiles in the project, build a Docker image for each one, and tag the image with the DockerHub username and the relative path of the Dockerfile. The script uses GNU `parallel` to build the images in parallel.
The `build.sh` script is configured to fail fast, meaning it will stop as soon as one job fails.
## CircleCI Integration
This project is configured to use CircleCI for continuous integration. The CircleCI configuration is located in `.circleci/config.yml`.
The CircleCI job checks out the project code, installs the `parallel` command, and runs the `build.sh` script.
## Directory Structure and Image Tagging
The script tags the Docker images with the DockerHub username and the relative path of the Dockerfile. For example, if the DockerHub username is `myusername` and the Dockerfile is located at `php/8.2/browsers/Dockerfile`, the image will be tagged as `myusername/php:8.2-browsers`.
See the `build.sh` script for more details.