From 759caaade1e16e5efb6d46e3170bc8b41492aaec Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Sat, 25 Jan 2020 00:47:28 +0100 Subject: [PATCH] Upgrading to NodeJS 12.x and PHP 7:latest --- Dockerfile | 59 +++++++++++++++++++++++++++++------------------------- README.md | 8 ++++---- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index dee00fc..67c80ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,35 @@ -FROM php:7.1 +FROM php:7 MAINTAINER Carlos A. Gomes -# Add Node.js repo RUN \ - apt-get update \ - && apt-get install --no-install-recommends -y apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && curl -sL https://deb.nodesource.com/setup_9.x | bash - \ - && apt-get install --no-install-recommends -y \ - nodejs \ - unzip \ - build-essential \ - openssh-client \ - rsync \ - git \ - yarn \ - - - # Slim down image - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man/?? /usr/share/man/??_* \ - # Show versions - && php -v \ - && echo "node: `node -v` " \ - && echo "npm: `npm -v`" \ - # Install composer - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - + apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + apt-transport-https \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && curl -sL https://deb.nodesource.com/setup_12.x | bash - \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + nodejs \ + unzip \ + build-essential \ + openssh-client \ + rsync \ + git \ + yarn \ + + + # Slim down image + && apt-get clean \ + && rm -rf \ + /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* \ + /usr/share/man/?? \ + /usr/share/man/??_* \ + + # Install composer + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + # Show versions + && php -v \ + && echo "node: `node -v` " \ + && echo "npm: `npm -v`" diff --git a/README.md b/README.md index 91cad78..16f7769 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # composer-and-node-ci -A docker image to be used on continous integration projects. +A docker image to be used on continuous integration projects. -It was made to use with Laravel and/or Frontend projects, since it has all what is needed to build both types of projects. +It was made to use with Laravel and/or Frontend projects since it has all that is needed to build both types of projects. ## This image includes: -* PHP 7.1 +* PHP 7:latest * composer - latest -* NodeJS 8.x and NPM +* NodeJS 12.x and NPM * yarn - latest * openssh client * git