feature (#752): build args GIT_REPO GIT_REF

This commit is contained in:
Ryan McGuire 2024-11-12 20:22:36 -07:00 committed by GitHub
parent 05f112305d
commit 2e869f5ec8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,13 @@
# STEP1: CLONE THE CODE
FROM alpine:latest as builder_prepare
WORKDIR /home/
RUN apk add git && \
git clone --depth 1 https://github.com/mickael-kerjean/filestash
ARG GIT_REPO=https://github.com/mickael-kerjean/filestash
ARG GIT_REF=master
RUN apk add --no-cache git && \
git init filestash && \
git -C filestash remote add origin ${GIT_REPO} && \
git -C filestash fetch --depth 1 origin ${GIT_REF} && \
git -C filestash checkout FETCH_HEAD
# STEP2: BUILD THE FRONTEND
FROM node:18-alpine AS builder_frontend