From b0a7035b69b6c4e7f3d0ce44c4f09ecbb6008520 Mon Sep 17 00:00:00 2001 From: gdamiens <gdamiens@picasoft.net> Date: Tue, 4 Jun 2019 09:46:23 +0200 Subject: [PATCH] improve Dockerfile for CI --- pica-tellform/Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pica-tellform/Dockerfile b/pica-tellform/Dockerfile index 51a35703..4e591a5b 100644 --- a/pica-tellform/Dockerfile +++ b/pica-tellform/Dockerfile @@ -3,8 +3,8 @@ LABEL maintainer="liam.dhenin@etu.utc.fr" ENV NODE_ENV="development" FROM base as downloader -RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list -RUN apt-get update && \ +RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list && \ + apt-get update && \ apt-get install -y \ bzip2 \ git \ @@ -24,9 +24,11 @@ WORKDIR /opt/tellform # Trouver mieux que le git clone... #COPY entrypoint.sh /opt/tellform/entrypoint.sh RUN git clone https://github.com/tellform/tellform . && git checkout stable2.1 -RUN npm install -RUN bower install -RUN grunt build +COPY tellform-patch.patch /opt +RUN cd /opt; patch -p0 < tellform-patch.patch; exit 0 && \ + npm install && \ + bower install && \ + grunt build FROM base @@ -38,10 +40,10 @@ RUN chmod +x /opt/tellform/entrypoint.sh && \ COPY --from=downloader --chown=node /opt/tellform /opt/tellform -RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list -RUN apt update && apt install -y git -RUN apt install -y vim -RUN npm install -g bower grunt-cli +RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list && \ + apt update && apt install -y git && \ + apt install -y vim && \ + npm install -g bower grunt-cli USER node WORKDIR /opt/tellform -- GitLab