1 FROM node:alpine as builder
\r
2 RUN apk update && apk add curl yarn python3 build-base gcc wget git --no-cache
\r
7 COPY package.json yarn.lock ./
\r
8 RUN yarn install --ignore-scripts --prefer-offline --pure-lockfile
\r
11 COPY generate_translations.js \
\r
17 COPY lemmy-translations lemmy-translations
\r
21 RUN echo "export const VERSION = 'dev';" > "src/shared/version.ts"
\r
23 RUN yarn install --ignore-scripts --prefer-offline
\r
26 FROM node:alpine as runner
\r
27 COPY --from=builder /usr/src/app/dist /app/dist
\r
28 COPY --from=builder /usr/src/app/node_modules /app/node_modules
\r
32 CMD node dist/js/server.js
\r