-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from Dhruv-Pattel/dhruv
solved bug of dockerfile
- Loading branch information
Showing
3 changed files
with
14 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
# Step 1: Use an official Node runtime as a parent image | ||
FROM node:latest | ||
|
||
# Step 2: Set the working directory to /app | ||
FROM node:18-alpine | ||
WORKDIR /app | ||
|
||
# Step 3: Copy package.json and package-lock.json | ||
COPY package*.json ./ | ||
|
||
# Step 4: Install any needed packages specified in package.json | ||
RUN npm install | ||
|
||
# Step 5: Copy the rest of the working directory contents into the container at /app | ||
COPY . . | ||
|
||
# Build your app for production with Vite | ||
RUN npm run build | ||
|
||
# Step 6: Make port 3000 available to the world outside this container | ||
EXPOSE 3000 | ||
|
||
# Step 7 (Removed): No need to define environment variable here since we're passing them at runtime with --env-file | ||
|
||
# Step 8: Run app when the container launches (Assuming 'npm start' serves your built application) | ||
CMD ["npm", "run","dev"] | ||
RUN npm install | ||
EXPOSE 5173 | ||
CMD npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- "5173:5173" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters