Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
-
# Use the official
|
| 2 |
-
FROM
|
| 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 |
-
# Install Python and pip
|
| 11 |
-
RUN apt-get update && \
|
| 12 |
-
apt-get install -y python3 python3-pip
|
| 13 |
-
|
| 14 |
# Install FastAPI dependencies
|
| 15 |
-
RUN
|
| 16 |
|
| 17 |
# Install Node.js dependencies
|
| 18 |
-
RUN npm install
|
| 19 |
|
| 20 |
# Expose the port that Next.js uses (default is 3000)
|
| 21 |
EXPOSE 3000
|
| 22 |
|
| 23 |
# Command to run the development environment
|
| 24 |
-
CMD ["npm", "run", "dev"]
|
|
|
|
| 1 |
+
# Use the official Python image as base
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install Node.js
|
| 8 |
+
RUN apt-get update && \
|
| 9 |
+
apt-get install -y nodejs npm
|
| 10 |
+
|
| 11 |
# Clone the GitHub repository
|
| 12 |
RUN git clone https://github.com/Zulelee/ilearn.git .
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Install FastAPI dependencies
|
| 15 |
+
RUN pip install -r requirements.txt
|
| 16 |
|
| 17 |
# Install Node.js dependencies
|
| 18 |
+
RUN npm install
|
| 19 |
|
| 20 |
# Expose the port that Next.js uses (default is 3000)
|
| 21 |
EXPOSE 3000
|
| 22 |
|
| 23 |
# Command to run the development environment
|
| 24 |
+
CMD ["npm", "run", "dev"]
|