Upload Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -14,7 +14,8 @@ RUN chown -R node:node /app
|
|
| 14 |
# Initialize git repository (required for the build)
|
| 15 |
RUN git init && \
|
| 16 |
git config --global user.email "[email protected]" && \
|
| 17 |
-
git config --global user.name "Docker Build"
|
|
|
|
| 18 |
|
| 19 |
# Switch to non-root user
|
| 20 |
USER node
|
|
@@ -27,7 +28,9 @@ RUN pnpm install
|
|
| 27 |
COPY --chown=node:node . .
|
| 28 |
|
| 29 |
# Add files to git to avoid build errors
|
| 30 |
-
RUN git add . &&
|
|
|
|
|
|
|
| 31 |
|
| 32 |
# Set environment variables for build
|
| 33 |
ENV NODE_ENV=production
|
|
|
|
| 14 |
# Initialize git repository (required for the build)
|
| 15 |
RUN git init && \
|
| 16 |
git config --global user.email "[email protected]" && \
|
| 17 |
+
git config --global user.name "Docker Build" && \
|
| 18 |
+
git config --global --add safe.directory /app
|
| 19 |
|
| 20 |
# Switch to non-root user
|
| 21 |
USER node
|
|
|
|
| 28 |
COPY --chown=node:node . .
|
| 29 |
|
| 30 |
# Add files to git to avoid build errors
|
| 31 |
+
RUN git config --global --add safe.directory /app && \
|
| 32 |
+
git add . && \
|
| 33 |
+
git commit -m "Initial commit"
|
| 34 |
|
| 35 |
# Set environment variables for build
|
| 36 |
ENV NODE_ENV=production
|