# build stage that will only be used for building FROM node:22-alpine AS builder MAINTAINER Wizardy and Steamworks # install an svn client to check out the project RUN apk add --no-cache subversion WORKDIR /app # retrive current project version RUN svn checkout https://svn.grimore.org/fasterProwl . # install all runtime dependencies RUN npm ci --production # --- # final minimal image is built using just runtime requirements FROM node:22-alpine # set the environment to production ENV NODE_ENV=production # make a directory to be mounted for the configruation RUN mkdir -p /config VOLUME /config # set the current directory to the app directory WORKDIR /app # we don't copy the .svn folders, keeping the image tiny COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/fasterProwl.js ./fasterProwl.js RUN chmod +x fasterProwl.js # COPY --from=builder /app/package.json ./package.json # run as non-root user USER node # launch fasterProwl with the path to a configuration file on the mounted volume CMD ["fasterProwl.js", "--config", "/config/config.yml"]