mirror of
https://github.com/linuxserver/docker-piwigo.git
synced 2025-04-24 05:07:05 -04:00
download during build
This commit is contained in:
parent
0af4cfff5b
commit
121c47b60d
4 changed files with 17 additions and 10 deletions
|
@ -35,12 +35,15 @@ RUN \
|
|||
re2c \
|
||||
unzip \
|
||||
wget && \
|
||||
echo "**** set version tag ****" && \
|
||||
echo "**** download piwigo ****" && \
|
||||
if [ -z ${PIWIGO_RELEASE+x} ]; then \
|
||||
PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
echo ${PIWIGO_RELEASE} > /version.txt
|
||||
mkdir /piwigo && \
|
||||
curl -o \
|
||||
/piwigo/piwigo.zip -L \
|
||||
"http://piwigo.org/download/dlcounter.php?code=${PIWIGO_RELEASE}"
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
|
|
@ -35,12 +35,15 @@ RUN \
|
|||
re2c \
|
||||
unzip \
|
||||
wget && \
|
||||
echo "**** set version tag ****" && \
|
||||
echo "**** download piwigo ****" && \
|
||||
if [ -z ${PIWIGO_RELEASE+x} ]; then \
|
||||
PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
echo ${PIWIGO_RELEASE} > /version.txt
|
||||
mkdir /piwigo && \
|
||||
curl -o \
|
||||
/piwigo/piwigo.zip -L \
|
||||
"http://piwigo.org/download/dlcounter.php?code=${PIWIGO_RELEASE}"
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
|
|
@ -35,12 +35,15 @@ RUN \
|
|||
re2c \
|
||||
unzip \
|
||||
wget && \
|
||||
echo "**** set version tag ****" && \
|
||||
echo "**** download piwigo ****" && \
|
||||
if [ -z ${PIWIGO_RELEASE+x} ]; then \
|
||||
PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
echo ${PIWIGO_RELEASE} > /version.txt
|
||||
mkdir /piwigo && \
|
||||
curl -o \
|
||||
/piwigo/piwigo.zip -L \
|
||||
"http://piwigo.org/download/dlcounter.php?code=${PIWIGO_RELEASE}"
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
|
|
@ -6,11 +6,9 @@ mkdir -p \
|
|||
|
||||
# install piwigo
|
||||
if [ ! -f "/config/www/gallery/index.php" ]; then
|
||||
PIWIGO_RELEASE=$(cat /version.txt)
|
||||
curl -o /tmp/piwigo.zip -L "http://piwigo.org/download/dlcounter.php?code=${PIWIGO_RELEASE}"
|
||||
unzip -q /tmp/piwigo.zip -d /tmp
|
||||
unzip -q /piwigo/piwigo.zip -d /tmp
|
||||
mv /tmp/piwigo/* /config/www/gallery
|
||||
rm -rf /tmp/piwigo /tmp/piwigo.zip
|
||||
rm -rf /tmp/piwigo
|
||||
fi
|
||||
|
||||
# copy config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue