Upload Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the Node.js 18 slim image as a parent image
|
| 2 |
+
FROM node:18-slim
|
| 3 |
+
|
| 4 |
+
# Install git (required for cloning the repository)
|
| 5 |
+
RUN apt-get update && apt-get install -y git
|
| 6 |
+
|
| 7 |
+
# Set the working directory in the container
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
# Clone the repository
|
| 11 |
+
RUN git clone https://github.com/itzzzme/anime-api.git .
|
| 12 |
+
|
| 13 |
+
# Install the dependencies
|
| 14 |
+
RUN npm install
|
| 15 |
+
|
| 16 |
+
# Expose port 7860
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Start the application
|
| 20 |
+
CMD ["npm", "start"]
|