pcottle.learnGitBranching/Dockerfile
Brandon McClure 0df7d3a3dc
docker image to build/deploy app
gh action to build/push that image to ghcr
2022-08-14 14:45:45 -06:00

22 lines
428 B
Docker

FROM node:14.20.0-alpine3.16 as build
RUN apk add git --no-cache
WORKDIR "/src"
COPY . /src
RUN yarn install && \
yarn cache clean
RUN yarn gulp build
FROM scratch AS export
WORKDIR /
COPY --from=build /src/index.html .
COPY --from=build /src/build ./build
FROM nginx:stable-alpine
WORKDIR /usr/share/nginx/html/
COPY . .
# Override the local source with the built artifacts
COPY --from=export . .