diff --git a/Dockerfile b/Dockerfile index ccf465f..67de752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,14 +77,14 @@ RUN set -e; \ mkdir -p /src && cd /src; \ cp "${LOCAL_TARBALL}" exchange.tar.gz; \ tar xzf exchange.tar.gz; \ - EXCHANGE_DIR="$(ls -d taler-exchange-* exchange-* 2>/dev/null | head -1)"; \ + EXCHANGE_DIR="$(tar -tzf exchange.tar.gz | head -1 | cut -d/ -f1)"; \ EXCHANGE_TAR=1; \ elif [ -n "${EXCHANGE_TARBALL_URL}" ]; then \ echo "Fetching Exchange tarball ${EXCHANGE_TARBALL_URL}"; \ mkdir -p /src && cd /src; \ curl -L "${EXCHANGE_TARBALL_URL}" -o exchange.tar.gz; \ tar xzf exchange.tar.gz; \ - EXCHANGE_DIR="$(ls -d taler-exchange-* exchange-* 2>/dev/null | head -1)"; \ + EXCHANGE_DIR="$(tar -tzf exchange.tar.gz | head -1 | cut -d/ -f1)"; \ EXCHANGE_TAR=1; \ else \ git clone --depth 1 --branch "${EXCHANGE_REF}" https://git.taler.net/exchange.git /src/exchange; \ @@ -123,14 +123,14 @@ RUN set -e; \ mkdir -p /src && cd /src; \ cp "${LOCAL_TARBALL}" merchant.tar.gz; \ tar xzf merchant.tar.gz; \ - MERCHANT_DIR="$(ls -d taler-merchant-* merchant-* 2>/dev/null | head -1)"; \ + MERCHANT_DIR="$(tar -tzf merchant.tar.gz | head -1 | cut -d/ -f1)"; \ MERCHANT_TAR=1; \ elif [ -n "${MERCHANT_TARBALL_URL}" ]; then \ echo "Fetching Merchant tarball ${MERCHANT_TARBALL_URL}"; \ mkdir -p /src && cd /src; \ curl -L "${MERCHANT_TARBALL_URL}" -o merchant.tar.gz; \ tar xzf merchant.tar.gz; \ - MERCHANT_DIR="$(ls -d merchant-* | head -1)"; \ + MERCHANT_DIR="$(tar -tzf merchant.tar.gz | head -1 | cut -d/ -f1)"; \ MERCHANT_TAR=1; \ else \ git clone --depth 1 --branch "${MERCHANT_REF}" https://git.taler.net/merchant.git /src/merchant; \