akkoma-fe/Dockerfile
2024-09-06 07:31:42 +09:00

24 lines
436 B
Docker

FROM node:22.6.0-alpine3.20 as build
RUN apk add --no-cache \
git \
chromium-chromedriver
# use chromedriver from apk
ENV CHROMEDRIVER_FILEPATH=/usr/bin/chromedriver
WORKDIR /app/
ARG NODE_ENV=production
ENV YARN_CACHE_FOLDER=/.yarn/
COPY . /app/
RUN \
--mount=type=cache,target=/.yarn \
NODE_ENV=development yarn install \
&& NODE_ENV=${NODE_ENV} yarn run build
FROM scratch as result
COPY --from=build /app/dist/ /