Chore: Remove diagnostic ls commands from Dockerfile

This commit is contained in:
Greg 2025-05-25 17:21:51 +02:00
parent 43dff7d415
commit c2d4c58fb1

View File

@ -17,22 +17,12 @@ COPY . .
# - Removed the '|| mkdir ...' fallback to ensure Hugo errors stop the build and are visible. # - Removed the '|| mkdir ...' fallback to ensure Hugo errors stop the build and are visible.
RUN hugo --gc --minify --logLevel info --logLevel debug RUN hugo --gc --minify --logLevel info --logLevel debug
# --- DIAGNOSTIC COMMAND ---
# List contents of Hugo's output directory
RUN echo "Contents of /src/public after Hugo build:" && ls -R /src/public || echo "/src/public is empty or does not exist"
# --- END DIAGNOSTIC ---
# Stage 2: Serve the site with Nginx # Stage 2: Serve the site with Nginx
FROM nginx:1.25-alpine FROM nginx:1.25-alpine
# Copy the built static site from the builder stage's /src/public directory # Copy the built static site from the builder stage's /src/public directory
COPY --from=builder /src/public /usr/share/nginx/html COPY --from=builder /src/public /usr/share/nginx/html
# --- DIAGNOSTIC COMMAND ---
# List contents of Nginx's webroot after copying files
RUN echo "Contents of /usr/share/nginx/html after COPY:" && ls -R /usr/share/nginx/html || echo "/usr/share/nginx/html is empty or does not exist"
# --- END DIAGNOSTIC ---
# Copy our custom Nginx configuration from the project root (copied in Stage 1) # Copy our custom Nginx configuration from the project root (copied in Stage 1)
# into the Nginx configuration directory. # into the Nginx configuration directory.
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf