🐳 Improve automatic docker build

This commit is contained in:
Jan Oberhauser 2019-08-10 00:07:01 +02:00
parent 135431ebcd
commit ce69b349cf
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
FROM mhart/alpine-node:10
ARG N8N_VERSION
RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi
# Update everything and install needed dependencies
RUN apk add --update \
graphicsmagick
@ -10,7 +14,7 @@ USER root
# Install n8n and the also temporary all the packages
# it needs to build it correctly.
RUN apk --update add --virtual build-dependencies python build-base && \
npm_config_user=root npm install -g n8n && \
npm_config_user=root npm install -g n8n@${N8N_VERSION} && \
apk del build-dependencies
WORKDIR /data

View file

@ -0,0 +1,2 @@
#!/bin/bash
docker build --build-arg N8N_VERSION=$DOCKER_TAG -f $DOCKERFILE_PATH -t $IMAGE_NAME .