X-Git-Url: http://these/git/?a=blobdiff_plain;f=dev.dockerfile;h=881d9bc35f3e800e6dba154530cd9f2c6f05da71;hb=dbeab6450bce05c7bca898935e8b4f6d3d72ff5a;hp=51bcd26cfa0a55ba97e09d2c478692ac7e0e2a83;hpb=24548ccba8cbfe95c883e763f3e3644d3f02139c;p=lemmy-ui.git diff --git a/dev.dockerfile b/dev.dockerfile index 51bcd26..881d9bc 100644 --- a/dev.dockerfile +++ b/dev.dockerfile @@ -1,11 +1,15 @@ -FROM node:alpine as builder +FROM node:20.2-alpine as builder RUN apk update && apk add curl yarn python3 build-base gcc wget git --no-cache WORKDIR /usr/src/app +ENV npm_config_target_arch=x64 +ENV npm_config_target_platform=linux +ENV npm_config_target_libc=musl + # Cache deps COPY package.json yarn.lock ./ -RUN yarn install --ignore-scripts --prefer-offline --pure-lockfile +RUN yarn --prefer-offline --pure-lockfile # Build COPY generate_translations.js \ @@ -16,11 +20,12 @@ COPY generate_translations.js \ COPY lemmy-translations lemmy-translations COPY src src +COPY .git .git # Set UI version RUN echo "export const VERSION = 'dev';" > "src/shared/version.ts" -RUN yarn install --ignore-scripts --prefer-offline +RUN yarn --prefer-offline RUN yarn build:dev FROM node:alpine as runner @@ -29,4 +34,4 @@ COPY --from=builder /usr/src/app/node_modules /app/node_modules EXPOSE 1234 WORKDIR /app -CMD node dist/js/server.js +CMD node dist/js/server.js \ No newline at end of file