Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyfilyanin authored Jan 16, 2025
1 parent 0eaf81e commit 3033344
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions digit-recognition/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine AS builder
FROM node:18-alpine

WORKDIR /opt

Expand All @@ -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"]

0 comments on commit 3033344

Please sign in to comment.