- Docker - To run images
- Docker Compose - For easier usability
- Act - For testing GitHub actions locally
- jq - For parsing JSON
brew install docker docker-compose
# or for Docker Desktop
brew install --cask docker
brew install act jq gnu-getopt
We also need a custom builder to build for multiple platforms. Following example calls it builder-default
.
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --name builder-default --driver docker-container --bootstrap --use
And optionally update submodules with
git submodule update --remote --merge
Note: Within the ./src/
folder
docker buildx bake --load
Build step is not required, since Docker Compose can also build the image
Note: Within the ./test/
folder
docker compose up -d
Following will simulate pushing to the branch
Note: At the project root ./
./.jenkins/ci-cd.sh --branch main --verbose
act --secret-file ./test/workflows/.secrets.dist
act workflow_dispatch --secret-file ./test/workflows/.secrets.dist
act -e ./test/workflows/event-tag.json --secret-file ./test/workflows/.secrets.dist
act pull_request -e ./test/workflows/event-pr.json --secret-file ./test/workflows/.secrets.dist
If you want to check the build, run the following commands
Note: Within the ./src/
folder
LABEL_CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
LABEL_VERSION=main \
LABEL_REVISION=$(git rev-parse HEAD) \
LABEL_BASE_DIGEST=$(docker images --digests iwfwebsolutions/nginx:1.22-latest --format '{{.Digest}}' | sed s/^\<none\>//) \
TAG2=1.0.0 \
docker buildx bake build --set '*.platform=linux/amd64' --load
To check the created tags:
docker images iwfwebsolutions/nginx-https-proxy
To check the created labels:
docker image inspect iwfwebsolutions/nginx-https-proxy:latest -f '{{ .Config.Labels }}'
# or
docker image inspect iwfwebsolutions/nginx-https-proxy:latest | jq -r '.[0].Config.Labels'
and then to actually publish
LABEL_CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
LABEL_VERSION=main \
LABEL_REVISION=$(git rev-parse HEAD) \
LABEL_BASE_DIGEST=$(docker images --digests iwfwebsolutions/nginx:1.22-latest --format '{{.Digest}}' | sed s/^\<none\>//) \
TAG2=1.0.0 \
docker buildx bake build --push
Please read CODE_OF_CONDUCT.md for details on our code of conduct, and CONTRIBUTING.md for the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
All the authors can be seen in the AUTHORS.md file.
Contributors can be seen in the CONTRIBUTORS.md file.
See also the full list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.txt file for details
A list of used libraries and code with their licenses can be seen in the ACKNOWLEDGMENTS.md file.