Skip to content

Commit 230a95a

Browse files
authored
Merge pull request #2 from Qualys/release/1.0.1
Update dockerfile
2 parents 0770a3f + 20bcb24 commit 230a95a

1 file changed

Lines changed: 25 additions & 13 deletions

File tree

dockerfile

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
# Container image that runs your code
2-
FROM alpine:3.14.2
1+
FROM alpine:3.22.0
32

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
423
COPY entrypoint.sh /entrypoint.sh
524
COPY resultParser.py /resultParser.py
625

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
1628

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

Comments
 (0)