From 1ab37158970766fd1126d56efd762b67b311173b Mon Sep 17 00:00:00 2001 From: Hanjo Meinhardt Date: Tue, 21 May 2019 20:11:50 +0200 Subject: [PATCH] switch to ubuntu18.04 base image, php7.2 and clean up build --- .drone.yml | 18 +++++++----------- Dockerfile | 33 +++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9ccdfc9..9962d5d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,20 +1,16 @@ pipeline: - build: - image: alpine:edge - commands: - - sed -i 's@@${BUILD_VERSION}@' Dockerfile - docker: image: plugins/docker repo: bunix42/ttrss + build_args: + - TTRSS_GIT_TAG=${TTRSS_GIT_TAG} tags: - - ${BUILD_VERSION} + - ${TTRSS_GIT_TAG} secrets: [ docker_username, docker_password ] - + matrix: - BUILD_VERSION: + TTRSS_GIT_TAG: - master - - 17.4 - - 17.12 - - 18.12 \ No newline at end of file + - 18.12 + - 19.2 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7bb969b..ae0bd23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,23 @@ -FROM ubuntu:14.04 +FROM ubuntu:18.04 MAINTAINER Hanjo Meinhardt -RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ - nginx supervisor php5-fpm php5-cli php5-curl php5-gd php5-json \ - php5-pgsql php5-mysql php5-mcrypt && apt-get clean && rm -rf /var/lib/apt/lists/* +ARG TTRSS_GIT_TAG=master + +RUN apt-get update && apt-get install -y \ + nginx \ + supervisor \ + php7.2-fpm \ + php7.2-cli \ + php7.2-curl \ + php7.2-gd \ + php7.2-json \ + php7.2-pgsql \ + php7.2-mysql \ + curl \ + && apt-get clean && rm -rf /var/lib/apt/lists/* # enable the mcrypt module -RUN php5enmod mcrypt +#RUN php7enmod mcrypt # add ttrss as the only nginx site ADD ttrss.nginx.conf /etc/nginx/sites-available/ttrss @@ -15,11 +26,13 @@ RUN rm /etc/nginx/sites-enabled/default # install ttrss and patch configuration WORKDIR /var/www -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL https://git.tt-rss.org/git/tt-rss/archive/.tar.gz | tar xzC /var/www --strip-components 1 \ - && apt-get purge -y --auto-remove curl \ - && chown www-data:www-data -R /var/www -RUN cp config.php-dist config.php + +#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \ +# && apt-get purge -y --auto-remove curl \ + +RUN curl -SL https://git.tt-rss.org/git/tt-rss/archive/$TTRSS_GIT_TAG.tar.gz | tar xzC /var/www --strip-components 1 \ + && chown www-data:www-data -R /var/www \ + && cp config.php-dist config.php # expose only nginx HTTP port EXPOSE 80