From 3033344ee7224ba79ebaeeaad1710bb6d55e1e2a Mon Sep 17 00:00:00 2001 From: sergey filyanin Date: Thu, 16 Jan 2025 10:33:17 +0100 Subject: [PATCH] Update Dockerfile --- digit-recognition/frontend/Dockerfile | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/digit-recognition/frontend/Dockerfile b/digit-recognition/frontend/Dockerfile index 05e82c8..7cbcd41 100644 --- a/digit-recognition/frontend/Dockerfile +++ b/digit-recognition/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine AS builder +FROM node:18-alpine WORKDIR /opt @@ -21,28 +21,10 @@ ENV VITE_WALLET_CONNECT_PROJECT_ID=${VITE_WALLET_CONNECT_PROJECT_ID} \ VITE_ETH_NODE_ADDRESS=${VITE_ETH_NODE_ADDRESS} \ DISABLE_ESLINT_PLUGIN=true -RUN yarn build && yarn cache clean - - -FROM node:18-alpine - -WORKDIR /opt +RUN yarn build RUN npm install --global serve -COPY --from=builder /opt/dist ./dist - -ARG VITE_WALLET_CONNECT_PROJECT_ID \ - VITE_GEAR_API_NODE \ - VITE_ETH_NODE_ADDRESS \ - VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION - -ENV VITE_WALLET_CONNECT_PROJECT_ID=${VITE_WALLET_CONNECT_PROJECT_ID} \ - VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION=${VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION} \ - VITE_GEAR_API_NODE=${VITE_GEAR_API_NODE} \ - VITE_ETH_NODE_ADDRESS=${VITE_ETH_NODE_ADDRESS} \ - DISABLE_ESLINT_PLUGIN=true - EXPOSE 4173 -CMD ["serve", "-s", "dist"] +CMD ["serve", "-s", "/opt/dist"]