Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Jul 16, 2024
1 parent ea558bc commit 6535551
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:labs
FROM --platform="$BUILDPLATFORM" alpine:3.20.1 AS build
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
ARG PT_VERSION=v6.1.0 \
ARG PT_VERSION=v6.2.0 \
TARGETARCH

RUN apk upgrade --no-cache -a && \
Expand All @@ -17,7 +17,7 @@ RUN apk upgrade --no-cache -a && \
npm_config_arch=x64 npm_config_target_arch=x64 yarn install --pure-lockfile && \
npm_config_arch=x64 npm_config_target_arch=x64 npm run build && \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_arch=x64 npm_config_target_arch=x64 yarn install --pure-lockfile --production && \
NOCLIENT=true npm_config_arch=x64 npm_config_target_arch=x64 yarn install --pure-lockfile --production && \
for file in $(find /app/node_modules -name "*.node" -type f -exec file {} \; | grep -v "x86-64\|x86_64" | grep "aarch64\|arm64" | sed "s|\([^:]\):.*|\1|g"); do rm -v "$file"; done; \
elif [ "$TARGETARCH" = "arm64" ]; then \
cd /app/client && \
Expand All @@ -26,7 +26,7 @@ RUN apk upgrade --no-cache -a && \
npm_config_arch=arm64 npm_config_target_arch=arm64 yarn install --pure-lockfile && \
npm_config_arch=arm64 npm_config_target_arch=arm64 npm run build && \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_arch=arm64 npm_config_target_arch=arm64 yarn install --pure-lockfile --production && \
NOCLIENT=true npm_config_arch=arm64 npm_config_target_arch=arm64 yarn install --pure-lockfile --production && \
for file in $(find /app/node_modules -name "*.node" -type f -exec file {} \; | grep -v "aarch64\|arm64" | grep "x86-64\|x86_64" | sed "s|\([^:]\):.*|\1|g"); do rm -v "$file"; done; \
fi && \
yarn cache clean --all && \
Expand Down

0 comments on commit 6535551

Please sign in to comment.