Skip to content

Commit

Permalink
folder structure changed in docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
abinth11 committed Jul 31, 2023
1 parent 5850bb2 commit 965b08b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM node:16-alpine as build

# Set the working directory inside the container
WORKDIR /usr/src/reactapp
WORKDIR /reactapp

# Copy only package.json and yarn.lock to leverage Docker caching for faster builds
COPY package.json yarn.lock ./
Expand All @@ -20,11 +20,11 @@ RUN yarn build
FROM node:16-alpine

# Set the working directory inside the container
WORKDIR /usr/src/reactapp
WORKDIR /reactapp

# Copy the built app and only necessary node_modules from the previous stage
COPY --from=build /usr/src/reactapp/build ./build
COPY --from=build /usr/src/reactapp/node_modules ./node_modules
COPY --from=build /reactapp/build ./build
COPY --from=build /reactapp/node_modules ./node_modules

# Expose the port that the app will run on
EXPOSE 3000
Expand Down

0 comments on commit 965b08b

Please sign in to comment.