Use named context for check_standalong_config.sh #594
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit added a step to the build process to copy the
utils/check_standalone_config.sh
file into the targeted Docker project before being able to build the image. This is a well-meaning approach to reduce code duplication and ease maintenance. However, the problem with this approach is that it breaks the ability to use this repo as a remote Docker context as the Dockerfiles now include aCOPY
command for a file that does not exist in GitHub.The better way to handle this is to use named context to source the file from
./utils
. This PR updates the Dockerfile definitions and the Makefile build steps.With this change, anyone can now build images from my branch like this:
You can also define a Docker Bake file in your own repo to customize the final APISIX image. Name the file with the contents below
docker-bake.hcl
and build it with this command:docker buildx bake apisix
.Being able to build images on demand is very important for addressing security vulnerabilities that are resolved in the base debian/redhat image.