More explicity unpacking of .tar file

This commit is contained in:
David Bomba
2024-11-23 19:00:45 +11:00
parent c6648a8511
commit 47b015af7c

10
debian/Dockerfile vendored
View File

@@ -117,8 +117,14 @@ WORKDIR /var/www/html
RUN set -eux; \
DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \
curl -L "$DOWNLOAD_URL" | tar --strip-components=1 -xf - -C /var/www/html && \
rm -rf /var/www/html/ui && \
echo "Downloading from: $DOWNLOAD_URL" && \
# Download and save the tar
curl -L "$DOWNLOAD_URL" -o /tmp/ninja.tar && \
# Try extraction
cd /var/www/html && \
tar --strip-components=1 -xf /tmp/ninja.tar && \
# List what was extracted
rm -f /tmp/ninja.tar && \
chown -R www-data:www-data /var/www/html
# Install dependencies