From 10c9256d841a3194bcddc6d3980d135d090c99c8 Mon Sep 17 00:00:00 2001 From: Sindre Stephansen Date: Thu, 16 Mar 2023 12:32:48 +0100 Subject: [PATCH] Switch to alpine in sync container --- sync/Dockerfile | 6 +++--- sync/resolve-deps.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sync/Dockerfile b/sync/Dockerfile index 1a96a86..f4c4113 100644 --- a/sync/Dockerfile +++ b/sync/Dockerfile @@ -1,8 +1,8 @@ -FROM gradle:8-jdk11-jammy +FROM gradle:8-jdk11-alpine WORKDIR /workdir -RUN apt-get update && apt-get install -y python3-pip +RUN python3 -m ensurepip COPY requirements.txt . RUN python3 -m pip install -r requirements.txt @@ -10,4 +10,4 @@ RUN python3 -m pip install -r requirements.txt COPY resolve-deps.sh . COPY generate-gradle.py . -CMD [ "./resolve-deps.sh" ] +CMD [ "/bin/sh", "./resolve-deps.sh" ] diff --git a/sync/resolve-deps.sh b/sync/resolve-deps.sh index 3108538..e09e95a 100755 --- a/sync/resolve-deps.sh +++ b/sync/resolve-deps.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh is_reposilite_up () { - curl -s -o /dev/null repo:80 + nc repo 80 > /dev/null return $? } @@ -30,7 +30,7 @@ if [[ ! -f /package-list.txt ]]; then fi echo "Resolving packages and generating gradle config" -if ! ./generate-gradle.py --repo="repo:80" /package-list.txt; then +if ! python3 ./generate-gradle.py --repo="repo:80" /package-list.txt; then echo "Gradle generation failed" exit 255 fi