Skip to content
Snippets Groups Projects
Commit ffd0ccbf authored by michael.minelli's avatar michael.minelli
Browse files

Dockerfile => Create

parent c390502f
No related branches found
No related tags found
No related merge requests found
ARG BUILD_WORKDIR=/dojo/AssignmentChecker
######################################################################## Build stage
FROM node:18-alpine AS builder
LABEL maintainer="Michaël Minelli <dojo@minelli.me>"
LABEL Description="Dojo assignment checker - Build stage"
ARG BUILD_WORKDIR
# Create app directory
ADD AssignmentChecker/ ${BUILD_WORKDIR}/
WORKDIR ${BUILD_WORKDIR}
# Install app dependencies
RUN npm install -g pkg-fetch
RUN npm install
# Build app
RUN npm run build
# Transform app to binary
RUN npx pkg . -t node18 --output ${BUILD_WORKDIR}/bin/app --public-packages "*" --public
######################################################################## Run stage
FROM docker:latest
LABEL maintainer="Michaël Minelli <dojo@minelli.me>"
LABEL Description="Dojo assignment checker - Container generation for usage in assignment pipelines"
RUN apk update
RUN apk add git
ARG BUILD_WORKDIR
COPY --from=builder ${BUILD_WORKDIR}/bin/app /usr/local/bin/dojo_assignment_checker
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment