mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 10:32:17 -08:00
🐳 Improve automatic docker build
This commit is contained in:
parent
135431ebcd
commit
ce69b349cf
|
@ -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
|
||||
|
|
2
docker/images/n8n/hooks/build
Normal file
2
docker/images/n8n/hooks/build
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker build --build-arg N8N_VERSION=$DOCKER_TAG -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
Loading…
Reference in a new issue