From 91bf538f1cf8f2e237b7fed61655af988a40bdec Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 26 Jul 2018 16:22:40 +1000 Subject: [PATCH] Use mainline nginx package for x86_64 and attempt to fix arm build --- Dockerfile | 7 +++++-- Jenkinsfile | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 87e5171..a4dd3f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,14 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y curl ca-certificates apt-transport-https \ && apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg \ + && apt-key adv --fetch-keys http://nginx.org/keys/nginx_signing.key \ + && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" > /etc/apt/sources.list.d/nginx.list \ && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y \ - gnupg openssl dirmngr apt-transport-https wget nginx-full \ - inetutils-ping build-essential apache2-utils yarn \ + gnupg openssl dirmngr apt-transport-https wget \ + inetutils-ping build-essential apache2-utils yarn nginx \ && apt-get install --no-install-recommends --no-install-suggests -y certbot letsencrypt -t jessie-backports \ && apt-get clean @@ -34,6 +36,7 @@ ADD dist /srv/app/dist ADD node_modules /srv/app/node_modules ADD src/backend /srv/app/src/backend ADD package.json /srv/app/package.json +ADD knexfile.json /srv/app/knexfile.json # Volumes VOLUME [ "/data", "/etc/letsencrypt" ] diff --git a/Jenkinsfile b/Jenkinsfile index 8cdce83..280bef8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,10 +33,10 @@ pipeline { stage('Build armhf') { steps { ansiColor('xterm') { - sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf /usr/bin/qemu-arm-static yarn --registry=$NPM_REGISTRY install' - sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf /usr/bin/qemu-arm-static npm run-script build' + sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install' + sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf npm run-script build' sh 'rm -rf node_modules' - sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf /usr/bin/qemu-arm-static yarn --registry=$NPM_REGISTRY install --prod' + sh 'docker run --rm -v $(pwd):/srv/app -w /srv/app jc21/node:armhf yarn --registry=$NPM_REGISTRY install --prod' sh 'docker run --rm -v $(pwd):/data $DOCKER_CI_TOOLS node-prune' sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .' }