Files
projects/Dockers/puppeteer-healthcheck/Dockerfile
T
Bram f31ee9ac15
Build and Push Docker Images / build-and-push (push) Failing after 13s
I hate the vibe
2025-07-02 10:00:22 +02:00

35 lines
856 B
Docker

FROM python:3.9-slim
# Install required system dependencies
RUN apt-get update && apt-get install -y \
curl \
docker.io \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the healthcheck script
COPY healthcheck.py .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV BASE_URL="https://puppeteer.workwithkora.com"
ENV TEST_URL="https://www.google.com"
ENV API_KEY="Q7Sd#hhFkyHy*T"
ENV TARGET_CONTAINER="puppeteer-api"
ENV CHECK_INTERVAL=60
# Create docker group and user with docker group access
RUN groupadd -r docker && \
useradd -r -g docker healthcheck && \
chown -R healthcheck:docker /app
USER healthcheck
# Run the healthcheck script
CMD ["python", "healthcheck.py"]