Merge pull request #15 from linuxserver/auto_ver_check

Auto ver check
This commit is contained in:
Neil 2017-04-03 10:26:23 +01:00 committed by GitHub
commit 91d4ddb69b
2 changed files with 23 additions and 8 deletions

View File

@ -6,11 +6,13 @@ ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# set package version
ENV COPS_VER="1.1.0"
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
curl \
tar && \
# install runtime packages
RUN \
apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/main \
icu-libs \
@ -23,14 +25,22 @@ RUN \
php7-mbstring \
php7-opcache \
php7-openssl \
php7-phar \
php7-pdo_sqlite \
php7-zlib
php7-zip \
php7-zlib && \
# install composer
ln -sf /usr/bin/php7 /usr/bin/php && \
curl \
-sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/bin --filename=composer && \
composer \
global require "fxp/composer-asset-plugin:~1.1" && \
# install cops
RUN \
apk add --no-cache --virtual=build-dependencies \
curl \
tar && \
COPS_VER=$(curl -sX GET "https://api.github.com/repos/seblucas/cops/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/cops.tar.gz -L \
"https://github.com/seblucas/cops/archive/${COPS_VER}.tar.gz" && \
@ -38,11 +48,15 @@ RUN \
/usr/share/webapps/cops && \
tar xf /tmp/cops.tar.gz -C \
/usr/share/webapps/cops --strip-components=1 && \
cd /usr/share/webapps/cops && \
composer \
install --no-dev --optimize-autoloader && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/root/.composer \
/tmp/*
# add local files

View File

@ -110,6 +110,7 @@ Unlike other implementations of COPS in a docker container, the linuxserver ver
## Versions
+ **03.04.17:** Add composer packages, reduce layers.
+ **02.04.17:** Updated to version 1.1.0.
+ **05.02.17:** Updated to Alpine 3.5 & PHP7.
+ **24.10.16:** Updated to implement user based config.