Files
java-word-pdf/wordpdf-web/Dockerfile
T

18 lines
962 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:24-alpine AS build
# docker-прокси из ~/.docker/config.json BuildKit подмешивает в каждый RUN
# (ENV не перебивает), а 127.0.0.1 внутри контейнера недостижим — npm ci падает
# с ECONNREFUSED. Контейнер в сеть ходит напрямую, потому обнуляем прокси
# на самой команде.
WORKDIR /build
COPY package.json package-lock.json ./
RUN HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= ALL_PROXY= all_proxy= npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /build/dist /usr/share/nginx/html
# прокси из docker-config подмешивается в HEALTHCHECK-шелл — обнуляем на команде
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
CMD http_proxy= https_proxy= wget -qO /dev/null http://127.0.0.1/ || exit 1