Service-Xi commited on
Commit
b0948c9
·
verified ·
1 Parent(s): 8f4c89b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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/Kingdavid102/Fedex-update.git /app
8
 
9
  # Set working directory
10
  WORKDIR /app
@@ -12,10 +12,11 @@ WORKDIR /app
12
  # Install dependencies
13
  RUN npm install
14
 
15
- # Ensure permissions (skip mkdir since it already exists)
16
- RUN chown -R node:node /app && \
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