-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-test
More file actions
37 lines (28 loc) · 1.44 KB
/
Dockerfile-test
File metadata and controls
37 lines (28 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.13-alpine
# Install system dependencies (matching .gitlab-ci.yml)
RUN apk update && apk add --no-cache xdg-utils curl git openssl ca-certificates
# Install kubectl (matching .gitlab-ci.yml)
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
&& rm kubectl
# Install Poetry (matching .gitlab-ci.yml POETRY_VERSION)
ARG POETRY_VERSION=1.7.1
RUN pip install poetry==${POETRY_VERSION} \
&& poetry config virtualenvs.create false
# Copy and convert cloudferro certificate (DER to PEM), create combined CA bundle
COPY intra.cloudferro.com.cer /tmp/intra.cloudferro.com.cer
RUN openssl x509 -inform DER -in /tmp/intra.cloudferro.com.cer -out /tmp/cloudferro.pem \
&& cat /etc/ssl/certs/ca-certificates.crt /tmp/cloudferro.pem > /etc/ssl/certs/ca-bundle-combined.crt \
&& rm /tmp/intra.cloudferro.com.cer /tmp/cloudferro.pem
# Set SSL certificate bundle for all tools (Python ssl, requests, httpx, curl, etc.)
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-bundle-combined.crt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-bundle-combined.crt
WORKDIR /app
# Copy project files
COPY pyproject.toml poetry.lock* ./
COPY . .
# Install dependencies
RUN poetry install --with dev
# Use ENTRYPOINT so additional pytest args can be passed directly
ENTRYPOINT ["poetry", "run", "pytest"]
CMD ["tests/integration", "-v", "-s"]