Skip to content

Commit

Permalink
Fies for downloading package
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Jun 9, 2024
1 parent 50debff commit e31a2b7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions alpine/5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ FROM --platform=$BUILDPLATFORM node:lts-alpine as nodebuild

# Download Invoice Ninja
ARG INVOICENINJA_VERSION
ADD https://github.com/invoiceninja/invoiceninja/releases/download/v$INVOICENINJA_VERSION/react-invoiceninja.tar /tmp/ninja.tar
ARG REPOSITORY=invoiceninja/invoiceninja
ARG FILENAME=react-invoiceninja.tar

RUN set -eux; apk add curl unzip
RUN set -eux; apk add curl unzip grep

# Fetch the latest release information
RUN release_info=$(curl -s "https://api.github.com/repos/${REPOSITORY}/releases/latest") && \
download_url=$(echo "$release_info" | grep -o '"browser_download_url": "[^"]*'${FILENAME}'"' | cut -d '"' -f 4) && \
curl -LJO "$download_url" -o "/tmp/${FILENAME}"

# Extract Invoice Ninja
RUN mkdir -p /var/www/app \
Expand All @@ -34,15 +40,13 @@ RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

# Install chromium
# `ttf-dejavu` is Chinese supported fonts
RUN set -eux; \
apk add --no-cache \
font-isas-misc \
supervisor \
mysql-client \
chromium \
ttf-freefont \
ttf-dejavu
ttf-freefont

RUN install-php-extensions \
bcmath \
Expand Down Expand Up @@ -71,7 +75,7 @@ RUN addgroup --gid=$UID -S "$INVOICENINJA_USER" \
--ingroup "$INVOICENINJA_USER" \
"$INVOICENINJA_USER"

# WORKDIR /var/www/app
WORKDIR /var/www/app

# Set up app
ARG INVOICENINJA_VERSION
Expand Down

0 comments on commit e31a2b7

Please sign in to comment.