Files
valtrix-web/Dockerfile
clemo 784ad1a148
All checks were successful
Build and Deploy Container / build_and_deploy (push) Successful in 26s
Removed Expose
Removed exposed ports, because not required for traefik.
2026-01-03 18:11:55 +01:00

37 lines
1009 B
Docker

# Stage 1: Builder
# We use a lightweight Wolfi image to gather the files.
# In a real build process, this might involve 'npm run build', but for static files,
# we just copy them. Using a stage here allows for future extensibility.
FROM cgr.dev/chainguard/wolfi-base AS builder
WORKDIR /app
# Copy all files to the builder stage
COPY . .
# Stage 2: Final
# Use the official Wolfi base image and install Caddy manually
# since the pre-built Caddy image requires authentication or is restricted.
FROM cgr.dev/chainguard/wolfi-base:latest
# Install Caddy
RUN apk update && apk add caddy
# Copy the Caddyfile
COPY Caddyfile /etc/caddy/Caddyfile
# Copy the static site content from the builder stage
COPY --from=builder /app /usr/share/caddy
# Expose ports
# 80 for HTTP
# 443 for HTTPS (and HTTP/3 over UDP)
# 20260103 - Disble Expose Ports => Traefik is handling
# EXPOSE 80
# EXPOSE 443
# EXPOSE 443/udp
# Run Caddy
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]