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 May 2, 2024
1 parent 2e3439a commit ad15b1d
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,22 @@ RUN apk upgrade --no-cache -a && \
if [ "$TARGETARCH" = "amd64" ]; then \
cd /app/client && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile && \
clean-modules --yes && \
cd /app && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile && \
clean-modules --yes && \
npm_config_target_platform=linux npm_config_target_arch=x64 npm run build && \
clean-modules --yes && \
rm -r /app/client/node_modules /app/node_modules /app/client/.angular && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile --production && \
clean-modules --yes; \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile --production; \
elif [ "$TARGETARCH" = "arm64" ]; then \
cd /app/client && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile && \
clean-modules --yes && \
cd /app && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile && \
clean-modules --yes && \
npm_config_target_platform=linux npm_config_target_arch=arm64 npm run build && \
clean-modules --yes && \
rm -r /app/client/node_modules /app/node_modules /app/client/.angular && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile --production && \
clean-modules --yes; \
rm -r /app/client/.angular /app/client/node_modules /app/node_modules && \
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn install --no-lockfile --production; \
fi && \
cd /app && clean-modules --yes && \
cd /app/client && clean-modules --yes && \
yarn cache clean --all

FROM alpine:3.19.1
Expand Down

0 comments on commit ad15b1d

Please sign in to comment.