-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build multi OS for Docker #452
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f74616c
ci: build multi OS for Docker
williamdes f6f8c11
docs: update INSTALL.md
williamdes f69e13c
ci: add metadata to the Docker image
williamdes d49c5a6
ci: Allow to manually trigger docker builds
williamdes 985c9fb
ci: Add an Alpine build
williamdes 847fecd
ci: use push for Docker buildx and fix Alpine
williamdes 6bb7376
ci: add bash for Alpine
williamdes 9331711
ci: add more libs to link for gcc (alpine)
williamdes ad89c0f
ci: also fetch tags for git describe
williamdes 191540c
ci: also allow not having tags (repo fork for example)
williamdes 5bf11c1
ci: fix Alpine builds
williamdes 37af413
ci: add libbfd-dev for Docker
williamdes 99343a3
ci: add patchelf for tests
williamdes e26723e
ci: improve logic syntax
williamdes c7c9753
ci: provide "python" in the path
williamdes e4fd20d
ci: add binutils for objcopy
williamdes 178e11f
ci: add a fallback and print the release version
williamdes 9b7cb54
tests: lower timeout of attach_process_* tests
williamdes 6611829
ci: provide usr/bin/env to some scripts (alpine)
williamdes df77f82
ci: fix PATH for tests
williamdes e7f41cc
docs: Docker instructions
williamdes c7a2700
ci: fixup platforms for Debian
williamdes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
if [ "${1:-}" = "alpine" ]; then | ||
BUILD_OS="alpine" | ||
BUILD_BASE="3.20" | ||
elif [ "${1:-}" = "debian" ]; then | ||
BUILD_OS="debian" | ||
BUILD_BASE="bookworm-slim" | ||
else | ||
echo "Usage: docker-build.sh alpine" | ||
echo "Usage: docker-build.sh debian" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${RELEASE_VERSION:-}" ]; then | ||
RELEASE_VERSION="$(git describe --abbrev=4 --tags HEAD || git describe --abbrev=4 HEAD || git rev-parse HEAD)" | ||
fi | ||
|
||
set -x | ||
|
||
echo "Building for: ${BUILD_OS}" | ||
echo "Release: ${RELEASE_VERSION}" | ||
|
||
# https://github.com/docker/buildx#building | ||
docker buildx build \ | ||
--build-arg VCS_REF="$(git rev-parse HEAD)" \ | ||
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ | ||
--build-arg BUILD_OS="${BUILD_OS}" \ | ||
--build-arg RELEASE_VERSION="${RELEASE_VERSION}" \ | ||
--build-arg BUILD_BASE="${BUILD_BASE}" \ | ||
--tag ${IMAGE_TAG:-kcov} \ | ||
--progress ${PROGRESS_MODE:-plain} \ | ||
--platform ${PLATFORM:-linux/amd64} \ | ||
--pull \ | ||
--${ACTION:-load} \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, as you suggested, add this to the instructions somewhere? I guess the docker info can be placed in a
doc/docker.md
file, to reduce the clutter in README.md.