Moving docker file to a docker folder

This commit is contained in:
Oscar Vicente Perez 2023-08-15 11:25:23 +02:00
commit f603b550f6
3 changed files with 5 additions and 3 deletions

21
docker/Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM docker.n8n.io/n8nio/n8n:latest AS target
FROM node:18-alpine AS build
RUN npm i npm@latest -g
WORKDIR /build
COPY . .
RUN npm run build
FROM target as final
WORKDIR /custom-nodes
COPY --from=build /build .
COPY --from=build /build/docker/run.sh /run.sh
WORKDIR /custom-nodes
USER root
RUN npm link
USER node
ENTRYPOINT [ "tini", "--", "/run.sh" ]

5
docker/run.sh Normal file
View file

@ -0,0 +1,5 @@
#!/bin/sh
mkdir -p ~/.n8n/nodes/
cd ~/.n8n/nodes/
npm link n8n-nodes-<...>
/docker-entrypoint.sh