Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add base layer dockerfile for common setup #1447

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim as build
FROM node:18-slim as base

LABEL maintainer="Orta Therox"
LABEL "com.github.actions.name"="Danger JS Action"
Expand All @@ -7,6 +7,8 @@ LABEL "com.github.actions.icon"="zap"
LABEL "com.github.actions.color"="blue"

WORKDIR /usr/src/danger

FROM base as build
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
Expand All @@ -15,9 +17,7 @@ RUN yarn remove 'typescript' --dev && yarn add 'typescript'
RUN yarn install --production --frozen-lockfile
RUN chmod +x distribution/commands/danger.js


FROM node:18-slim
WORKDIR /usr/src/danger
glensc marked this conversation as resolved.
Show resolved Hide resolved
FROM base
ENV PATH="/usr/src/danger/node_modules/.bin:$PATH"
COPY package.json ./
COPY --from=build /usr/src/danger/distribution ./dist
Expand Down