Fix public directory copy in Dockerfile - use trailing slashes
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -10,13 +10,17 @@ RUN npm install --production
|
|||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
COPY server.js ./
|
COPY server.js ./
|
||||||
COPY public ./public
|
|
||||||
COPY migrations ./migrations
|
COPY migrations ./migrations
|
||||||
|
|
||||||
# Create non-root user
|
# Copy public directory explicitly
|
||||||
|
COPY public/ ./public/
|
||||||
|
|
||||||
|
# Create non-root user and fix permissions
|
||||||
RUN addgroup -g 1001 -S nodejs && \
|
RUN addgroup -g 1001 -S nodejs && \
|
||||||
adduser -S nodejs -u 1001 && \
|
adduser -S nodejs -u 1001 && \
|
||||||
chown -R nodejs:nodejs /app
|
chown -R nodejs:nodejs /app && \
|
||||||
|
ls -la /app && \
|
||||||
|
ls -la /app/public
|
||||||
|
|
||||||
USER nodejs
|
USER nodejs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user