Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -4,8 +4,8 @@ FROM node:18
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy package.json
|
| 8 |
-
COPY package.json
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
RUN yarn install
|
|
@@ -14,11 +14,11 @@ RUN yarn install
|
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
# Set permissions for the entire project and specific files/directories
|
| 17 |
-
RUN chmod -R 777 /app \
|
| 18 |
-
&& chmod -R 777 /app/session \
|
| 19 |
-
&& chmod 666 /app/messages.json \
|
| 20 |
-
&& chmod -R 777 . \
|
| 21 |
-
&& chmod +x /app/start.sh
|
| 22 |
|
| 23 |
# Expose the desired port (adjust as needed)
|
| 24 |
EXPOSE 7860
|
|
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy package.json first for caching layers
|
| 8 |
+
COPY package.json ./
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
RUN yarn install
|
|
|
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
# Set permissions for the entire project and specific files/directories
|
| 17 |
+
RUN chmod -R 777 /app \
|
| 18 |
+
&& chmod -R 777 /app/session \
|
| 19 |
+
&& chmod 666 /app/messages.json \
|
| 20 |
+
&& chmod -R 777 . \
|
| 21 |
+
&& chmod +x /app/start.sh
|
| 22 |
|
| 23 |
# Expose the desired port (adjust as needed)
|
| 24 |
EXPOSE 7860
|