Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Node.js image as base
|
| 2 |
+
FROM node:14
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Clone the GitHub repository
|
| 8 |
+
RUN git clone https://github.com/Zulelee/ilearn.git .
|
| 9 |
+
|
| 10 |
+
# Copy package.json and package-lock.json to the container
|
| 11 |
+
COPY package*.json ./
|
| 12 |
+
|
| 13 |
+
# Install dependencies
|
| 14 |
+
RUN npm install
|
| 15 |
+
|
| 16 |
+
# Expose the port that Next.js uses (default is 3000)
|
| 17 |
+
EXPOSE 3000
|
| 18 |
+
|
| 19 |
+
# Command to run the development environment
|
| 20 |
+
CMD ["npm", "run", "dev"]
|