Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -4,7 +4,7 @@ FROM node:18-alpine
|
|
| 4 |
RUN apk add --no-cache git
|
| 5 |
|
| 6 |
# Clone repo
|
| 7 |
-
RUN git clone https://github.com/
|
| 8 |
|
| 9 |
# Set working directory
|
| 10 |
WORKDIR /app
|
|
@@ -12,10 +12,11 @@ WORKDIR /app
|
|
| 12 |
# Install dependencies
|
| 13 |
RUN npm install
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
RUN
|
| 17 |
-
chmod -R 755 /app/public/uploads && \
|
| 18 |
touch /app/products.json && \
|
|
|
|
|
|
|
| 19 |
chmod 644 /app/products.json
|
| 20 |
|
| 21 |
# Switch to non-root user
|
|
|
|
| 4 |
RUN apk add --no-cache git
|
| 5 |
|
| 6 |
# Clone repo
|
| 7 |
+
RUN git clone https://github.com/Kingdavid103/fedex.git /app
|
| 8 |
|
| 9 |
# Set working directory
|
| 10 |
WORKDIR /app
|
|
|
|
| 12 |
# Install dependencies
|
| 13 |
RUN npm install
|
| 14 |
|
| 15 |
+
# Create uploads & products.json inside /app with correct permissions
|
| 16 |
+
RUN mkdir -p /app/uploads && \
|
|
|
|
| 17 |
touch /app/products.json && \
|
| 18 |
+
chown -R node:node /app && \
|
| 19 |
+
chmod -R 755 /app/uploads && \
|
| 20 |
chmod 644 /app/products.json
|
| 21 |
|
| 22 |
# Switch to non-root user
|