Skip to content
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

Allow building using podman #130

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ DOCKERFILE="Dockerfile-linux"

cleanup () {
echo "cleaning up docker containers/images"
docker rm -f "$IMAGE_NAME" || true
docker rmi -f "$IMAGE_NAME" || true
"$DOCKER" rm -f "$IMAGE_NAME" || true
"$DOCKER" rmi -f "$IMAGE_NAME" || true
}

cleanup
docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
"$DOCKER" build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "tor_version=$TOR_VERSION" \
--build-arg "zlib_version=$ZLIB_VERSION" \
--build-arg "libevent_version=$LIBEVENT_VERSION" \
Expand All @@ -20,8 +20,8 @@ docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "openssl_hash=$OPENSSL_HASH" \
--build-arg "tor_hash=$TOR_HASH" \
${1+"$@"} .
docker run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
docker cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor" "tor-$TOR_VERSION-linux-brave-$BRAVE_TOR_VERSION"
"$DOCKER" run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
"$DOCKER" cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor" "tor-$TOR_VERSION-linux-brave-$BRAVE_TOR_VERSION"

if ! ldd "tor-$TOR_VERSION-linux-brave-$BRAVE_TOR_VERSION" 2>&1 \
| grep -F -q 'not a dynamic executable'; then
Expand Down
10 changes: 5 additions & 5 deletions build_linux_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ DOCKERFILE="Dockerfile-linux-arm64"

cleanup () {
echo "cleaning up docker containers/images"
docker rm -f "$IMAGE_NAME" || true
docker rmi -f "$IMAGE_NAME" || true
"$DOCKER" rm -f "$IMAGE_NAME" || true
"$DOCKER" rmi -f "$IMAGE_NAME" || true
}

cleanup
docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
"$DOCKER" build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "tor_version=$TOR_VERSION" \
--build-arg "zlib_version=$ZLIB_VERSION" \
--build-arg "libevent_version=$LIBEVENT_VERSION" \
Expand All @@ -20,8 +20,8 @@ docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "openssl_hash=$OPENSSL_HASH" \
--build-arg "tor_hash=$TOR_HASH" \
${1+"$@"} .
docker run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
docker cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor" "tor-$TOR_VERSION-linux-arm64-brave-$BRAVE_TOR_VERSION"
"$DOCKER" run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
"$DOCKER" cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor" "tor-$TOR_VERSION-linux-arm64-brave-$BRAVE_TOR_VERSION"

if ! ldd "tor-$TOR_VERSION-linux-arm64-brave-$BRAVE_TOR_VERSION" 2>&1 \
| grep -F -q 'not a dynamic executable'; then
Expand Down
10 changes: 5 additions & 5 deletions build_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ DOCKERFILE="Dockerfile-mingw"

cleanup () {
echo "cleaning up docker containers/images"
docker rm -f "$IMAGE_NAME" || true
docker rmi -f "$IMAGE_NAME" || true
"$DOCKER" rm -f "$IMAGE_NAME" || true
"$DOCKER" rmi -f "$IMAGE_NAME" || true
}

cleanup
docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
"$DOCKER" build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "tor_version=$TOR_VERSION" \
--build-arg "zlib_version=$ZLIB_VERSION" \
--build-arg "libevent_version=$LIBEVENT_VERSION" \
Expand All @@ -20,5 +20,5 @@ docker build --no-cache -t "$IMAGE_NAME" -f "$DOCKERFILE" \
--build-arg "openssl_hash=$OPENSSL_HASH" \
--build-arg "tor_hash=$TOR_HASH" \
${1+"$@"} .
docker run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
docker cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor.exe" "tor-$TOR_VERSION-win32-brave-$BRAVE_TOR_VERSION.exe"
"$DOCKER" run --init --rm --name "$IMAGE_NAME" -d "$IMAGE_NAME"
"$DOCKER" cp "$IMAGE_NAME:/tor-$TOR_VERSION/install/bin/tor.exe" "tor-$TOR_VERSION-win32-brave-$BRAVE_TOR_VERSION.exe"
2 changes: 2 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ export ZLIB_HASH=ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593
export LIBEVENT_HASH=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
export OPENSSL_HASH=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
export TOR_HASH=59bb7d8890f6131b4ce5344f3dcea5deb2182b7f4f10ff0cb4e4d81f11b2cf65

export DOCKER="$(command -v docker || command -v podman)"
fmarier marked this conversation as resolved.
Show resolved Hide resolved