akkoma-fe/Dockerfile

25 lines
436 B
Text
Raw Normal View History

2024-09-05 22:23:02 +00:00
FROM node:22.6.0-alpine3.20 as build
2023-08-01 14:41:41 +00:00
RUN apk add --no-cache \
git \
chromium-chromedriver
# use chromedriver from apk
ENV CHROMEDRIVER_FILEPATH=/usr/bin/chromedriver
WORKDIR /app/
2024-09-05 22:23:02 +00:00
ARG NODE_ENV=production
ENV YARN_CACHE_FOLDER=/.yarn/
2023-08-01 14:41:41 +00:00
COPY . /app/
2024-09-05 22:23:02 +00:00
RUN \
--mount=type=cache,target=/.yarn \
NODE_ENV=development yarn install \
&& NODE_ENV=${NODE_ENV} yarn run build
FROM scratch as result
2023-08-01 14:41:41 +00:00
2024-09-05 22:23:02 +00:00
COPY --from=build /app/dist/ /