Use mainline nginx package for x86_64 and attempt to fix arm build

This commit is contained in:
Jamie Curnow 2018-07-26 16:22:40 +10:00
parent 2e7a912d54
commit 91bf538f1c
2 changed files with 8 additions and 5 deletions

View File

@ -11,12 +11,14 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y curl ca-certificates apt-transport-https \ && 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://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 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 \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-get update \ && apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \ && apt-get install --no-install-recommends --no-install-suggests -y \
gnupg openssl dirmngr apt-transport-https wget nginx-full \ gnupg openssl dirmngr apt-transport-https wget \
inetutils-ping build-essential apache2-utils yarn \ 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 install --no-install-recommends --no-install-suggests -y certbot letsencrypt -t jessie-backports \
&& apt-get clean && apt-get clean
@ -34,6 +36,7 @@ ADD dist /srv/app/dist
ADD node_modules /srv/app/node_modules ADD node_modules /srv/app/node_modules
ADD src/backend /srv/app/src/backend ADD src/backend /srv/app/src/backend
ADD package.json /srv/app/package.json ADD package.json /srv/app/package.json
ADD knexfile.json /srv/app/knexfile.json
# Volumes # Volumes
VOLUME [ "/data", "/etc/letsencrypt" ] VOLUME [ "/data", "/etc/letsencrypt" ]

6
Jenkinsfile vendored
View File

@ -33,10 +33,10 @@ pipeline {
stage('Build armhf') { stage('Build armhf') {
steps { steps {
ansiColor('xterm') { 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 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 npm run-script build'
sh 'rm -rf node_modules' 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 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 .' sh 'docker build --pull --no-cache --squash --compress -t $TEMP_IMAGE_NAME_ARM -f Dockerfile.armhf .'
} }