This repository has been archived on 2022-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
ContainerImage.WendyUI/Lowdefy/Dockerfile

27 lines
679 B
Docker
Raw Permalink Normal View History

2022-01-20 14:16:21 +00:00
# FROM node:14-buster AS build
2022-01-20 14:49:17 +00:00
FROM node:17-buster AS build
2022-01-20 13:49:37 +00:00
# Set working directory and node user
WORKDIR /home/node/lowdefy
RUN chown node:node /home/node/lowdefy
USER node
# Copy app config and change ownership of files to "node" user
COPY --chown=node:node . .
# Build the Lowdefy config using the Lowdefy CLI
RUN npx lowdefy@3.23.2 build
# Use the correct Lowdefy base image
FROM lowdefy/lowdefy:3.23.2
# Copy build output from build stage
COPY --from=build --chown=node:node /home/node/lowdefy/.lowdefy/build ./build
# Copy contents of public directory into image
COPY --chown=node:node ./public ./public
# Run the server on start
CMD ["node", "./dist/server.js"]