Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.admin
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# Put the API's origin (scheme + host + port) into the content security policy.
FROM alpine:3.20 AS config
ARG VITE_API_URL=
COPY --from=infra nginx.conf security-headers.conf /cfg/

Check failure on line 23 in docker/Dockerfile.admin

View workflow job for this annotation

GitHub Actions / Dockerfile lint

DL3022 warning: `COPY --from` should reference a previously defined `FROM` alias
RUN origin="$(printf '%s' "$VITE_API_URL" | sed -E 's|^(https?://[^/]+).*|\1|')"; \

Check failure on line 24 in docker/Dockerfile.admin

View workflow job for this annotation

GitHub Actions / Dockerfile lint

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
case "$origin" in http://*|https://*) ;; *) origin="";; esac; \
sed -i "s|__API_ORIGIN__|$origin|g" /cfg/security-headers.conf

FROM nginxinc/nginx-unprivileged:1.27-alpine AS runtime
FROM nginxinc/nginx-unprivileged:1.31-alpine AS runtime
COPY --from=config --chown=nginx:nginx /cfg/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=config --chown=nginx:nginx /cfg/security-headers.conf /etc/nginx/snippets/security-headers.conf
COPY --from=build --chown=nginx:nginx /app/dist /usr/share/nginx/html
Expand Down
Loading