From 597662fb268bbe2a62ac71b7400ba90ce13556b6 Mon Sep 17 00:00:00 2001 From: Jordan McClintock Date: Tue, 5 Jul 2022 16:35:54 -0500 Subject: [PATCH] fixed broken image build --- Containerfile | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/Containerfile b/Containerfile index 3627d9af6..72c93e845 100644 --- a/Containerfile +++ b/Containerfile @@ -1,26 +1,13 @@ -FROM node:stretch-slim AS builder -USER node - -WORKDIR /home/node - -COPY --chown=node:node . . - -RUN npm install -RUN npm run build - -FROM node:stretch-slim - -RUN useradd -ms /bin/bash appuser -USER appuser +FROM node:18 WORKDIR /app -COPY --from=builder --chown=appuser:appuser /home/node/node_modules node_modules -COPY --from=builder --chown=appuser:appuser /home/node/package.json . -COPY --from=builder --chown=appuser:appuser /home/node/packages packages -COPY --from=builder --chown=appuser:appuser /home/node/data/flows.json /root/.node-red/flows.json +COPY . . +RUN npm install -EXPOSE 1880 +ENV NODE_ENV=production -CMD [ "npm", "start" ] +RUN npm run build + +CMD [ "npm", "start", "--", "data/flows.json" ] \ No newline at end of file