-FROM node:14-alpine as builder\r
-RUN apk update && apk add yarn curl bash && rm -rf /var/cache/apk/*\r
-\r
-RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin\r
+FROM node:alpine as builder\r
+RUN apk update && apk add yarn python3 build-base gcc wget git --no-cache\r
\r
WORKDIR /usr/src/app\r
\r
\r
COPY lemmy-translations lemmy-translations\r
COPY src src\r
+COPY .git .git\r
+\r
+# Set UI version \r
+RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts"\r
\r
RUN yarn\r
RUN yarn build:prod\r
\r
-# Pruning\r
-# RUN npm prune --production\r
-RUN /usr/local/bin/node-prune\r
-\r
-FROM node:14-alpine as runner\r
+FROM node:alpine as runner\r
COPY --from=builder /usr/src/app/dist /app/dist\r
COPY --from=builder /usr/src/app/node_modules /app/node_modules\r
\r