|
1 | | -# Container image that runs your code |
2 | | -FROM alpine:3.14.2 |
| 1 | +FROM alpine:3.22.0 |
3 | 2 |
|
| 3 | +# Install dependencies |
| 4 | +RUN apk add --no-cache \ |
| 5 | + python3 \ |
| 6 | + py3-pip \ |
| 7 | + build-base \ |
| 8 | + python3-dev \ |
| 9 | + libffi-dev \ |
| 10 | + git |
| 11 | + |
| 12 | +# Create and activate a virtual environment |
| 13 | +RUN python3 -m venv /venv |
| 14 | +ENV PATH="/venv/bin:$PATH" |
| 15 | + |
| 16 | +# Upgrade pip and setuptools within the virtual environment |
| 17 | +RUN pip install --no-cache --upgrade pip setuptools |
| 18 | + |
| 19 | +# Install Python packages |
| 20 | +RUN pip install Qualys-IaC-Security |
| 21 | + |
| 22 | +# Copy application files |
4 | 23 | COPY entrypoint.sh /entrypoint.sh |
5 | 24 | COPY resultParser.py /resultParser.py |
6 | 25 |
|
7 | | -ENV PYTHONUNBUFFERED=1 |
8 | | -RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python |
9 | | -RUN python3 -m ensurepip |
10 | | -RUN pip3 install --no-cache --upgrade pip setuptools |
11 | | -RUN apk add --no-cache --virtual .pynacl_deps build-base python3-dev libffi-dev |
12 | | -RUN pip3 install Qualys-IaC-Security |
13 | | -RUN apk add git |
14 | | - |
15 | | -RUN ["chmod", "+x", "/entrypoint.sh"] |
| 26 | +# Make the entrypoint script executable |
| 27 | +RUN chmod +x /entrypoint.sh |
16 | 28 |
|
17 | | -# Code file to execute when the docker container starts up (`entrypoint.sh`) |
18 | | -ENTRYPOINT ["sh","/entrypoint.sh"] |
| 29 | +# Set the container entrypoint |
| 30 | +ENTRYPOINT ["sh", "/entrypoint.sh"] |
0 commit comments