You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thumbsup/docker/Dockerfile.test

20 lines
422 B
Docker

# Node.js + build dependencies + runtime dependencies
FROM ghcr.io/thumbsup/build:node-18
WORKDIR /app
# Switch to a non-root user
# So we can test edge-cases around file permissions
RUN adduser -D tester
RUN chown -R tester:tester /app
USER tester
# Install and cache dependencies
COPY --chown=tester package*.json /app
RUN npm ci
# Copy the entire source code
COPY --chown=tester . /app
# Run the tests
RUN npm test