Files
java-word-pdf/wordpdf-web/Containerfile
T
Pjandro 65746db9d2 Migrate repo from docker to podman
- git mv docker-compose*.yml -> compose*.yml, Dockerfile -> Containerfile
  (podman-compose picks compose.yml; buildah finds Containerfile first)
- compose/compose.dev: x-podman.name_separator_compat (dash container
  names), explicit app/web healthchecks (OCI export drops image
  HEALTHCHECK, depends_on service_healthy would hang forever), fixed
  subnet 10.113.0.0/24 gw 10.113.0.1 for the aardvark-dns resolver
- gateway/nginx.conf: resolver + proxy_pass via variables (static
  proxy_pass resolves once at start; podman-restart.service brings
  gateway up before app -> dead upstream, 502 until manual restart)
- Containerfiles: pin base images to docker.io/library/* (no
  unqualified-search-registries on hosts), truthful buildah proxy comments
- comments/docs: Docker HEALTHCHECK -> container HEALTHCHECK; READMEs,
  AGENTS.md updated for podman/podman-compose

Verified on dev (podman 5.7.0, podman-compose 1.5.0): stack up with
dash names, app/web healthy, conversion through gateway returns PDF,
gateway survives app container restart without restart (resolver).
2026-10-19 00:13:52 +00:00

23 lines
1.3 KiB
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 с полным именем реестра: podman не резолвит short-name без
# unqualified-search-registries в /etc/containers/registries.conf.
FROM docker.io/library/node:24-alpine AS build
# buildah подмешивает прокси-переменные хоста в каждый RUN (ENV не перебивает),
# а 127.0.0.1 внутри контейнера недостижим — npm ci падает с ECONNREFUSED на
# 127.0.0.1:proxy. Контейнер в сеть ходит напрямую, потому обнуляем прокси
# на самой команде.
WORKDIR /build
COPY package.json package-lock.json ./
RUN HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= ALL_PROXY= all_proxy= npm ci
COPY . .
# base для сборки SPA под префиксом: прод pjandro.ru — /pdf-converter/
# (compose прод-запуска передаёт arg); дефолт '/' — standalone
ARG VITE_BASE=/
ENV VITE_BASE=${VITE_BASE}
RUN npm run build
FROM docker.io/library/nginx:alpine
COPY --from=build /build/dist /usr/share/nginx/html
# прокси-переменные хоста подмешиваются в 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