Support rootless Podman builds
This commit is contained in:
8 files changed
+198
-78
No files matched your search
+7
-7
@@ -11,12 +11,11 @@ source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/paths.sh"
|
||||
source "$BUILD_ROOT/helpers/lock-helpers.sh"
|
||||
|
||||
# Function to update repository database using Docker
|
||||
# Function to update repository database using the selected container engine
|
||||
update_database() {
|
||||
print_info "Updating repository database in Docker container..."
|
||||
print_info "Updating repository database in a container..."
|
||||
|
||||
# Check Docker is available
|
||||
check_docker
|
||||
check_engine
|
||||
|
||||
# Ensure output directory exists
|
||||
if [[ ! -d "$REPO_DIR" ]]; then
|
||||
@@ -25,8 +24,9 @@ update_database() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make output directory writable for container
|
||||
make_dir_writable "$REPO_DIR"
|
||||
if [[ "$CONTAINER_ENGINE" == "docker" ]]; then
|
||||
make_dir_writable "$REPO_DIR"
|
||||
fi
|
||||
|
||||
# repo-add is architecture- and mirror-independent. Use the host-native edge
|
||||
# image, which also lets bootstrap-rc run before that channel exists remotely.
|
||||
@@ -37,7 +37,7 @@ update_database() {
|
||||
}
|
||||
build_docker_image "$BUILD_DIR" "$tool_arch" "edge"
|
||||
|
||||
docker run --rm "$(get_platform_arg "$tool_arch")" \
|
||||
"$CONTAINER_ENGINE" run "${CONTAINER_RUN_ARGS[@]}" --rm "$(get_platform_arg "$tool_arch")" \
|
||||
-e ARCH="$ARCH" \
|
||||
-e MIRROR="$MIRROR" \
|
||||
-v "$REPO_ROOT:/output" \
|
||||
|
||||
Reference in new issue
Block a user