diff --git a/platform/Dockerfile b/platform/Dockerfile index d314280..7216e11 100644 --- a/platform/Dockerfile +++ b/platform/Dockerfile @@ -2,25 +2,17 @@ FROM python:3.11-slim WORKDIR /app -# Install SSH client + docker CLI RUN apt-get update && apt-get install -y \ - openssh-client \ - curl \ - ca-certificates \ + openssh-client curl ca-certificates \ && install -m 0755 -d /etc/apt/keyrings \ && curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \ && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list \ - && apt-get update \ - && apt-get install -y docker-ce-cli \ + && apt-get update && apt-get install -y docker-ce-cli \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt -RUN pip install flask +RUN pip install --no-cache-dir -r requirements.txt flask COPY . . - EXPOSE 8000 - -CMD ["python", "app.py"] -EOF \ No newline at end of file +CMD ["python", "app.py"] \ No newline at end of file diff --git a/platform/Jenkinsfile b/platform/Jenkinsfile index 5c2cbfd..047c356 100644 --- a/platform/Jenkinsfile +++ b/platform/Jenkinsfile @@ -27,9 +27,10 @@ pipeline { --name management-platform \ --restart unless-stopped \ -p 8088:5000 \ - -e HOSTNAME=vmi3024229 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /root:/root \ + -v /etc/passwd:/etc/passwd:ro \ + -v /etc/shadow:/etc/shadow:ro \ -v /root/management-platform/config.py:/app/config.py:ro \ -v /root/management-platform/modules:/app/modules:ro \ management-platform:latest @@ -37,7 +38,6 @@ pipeline { docker ps | grep management-platform && echo "✅ Deployed OK" || exit 1 ''' } - } stage('Health Check') {