Skip to content

Commit 791996a

Browse files
J12934Ilyesbdlala
andcommitted
Improve scanner docker file
- Removing wrapper script, not needed when workdir is set to scb dir - Chowning files while copying Co-authored-by: Ilyes Bendlala <ilyes.bendlala@iteratec.com> Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
1 parent 3d79196 commit 791996a

2 files changed

Lines changed: 14 additions & 23 deletions

File tree

‎scanners/typo3scan/scanner/Dockerfile‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
#Base Image
5+
# Base Image
66
FROM python:3.9-alpine as base
77

8-
#Install git and Clone Repo
8+
# Install git and Clone Repo
99
RUN apk add git \
1010
&& git clone https://github.com/whoot/Typo3Scan.git \
1111
&& cd Typo3Scan \
1212
&& rm -r .git .github doc
13-
COPY wrapper.sh /Typo3Scan/wrapper.sh
1413

15-
#Runtime Image
14+
# Runtime Image
1615
FROM python:3.9-alpine as runtime
1716

18-
#Create typo3scan user/group and give access
17+
# Create typo3scan user/group and give access
1918
RUN addgroup --system --gid 1001 typo3scan && adduser typo3scan --system --uid 1001 --ingroup typo3scan
20-
COPY --from=base /Typo3Scan /home/typo3scan/Typo3Scan
21-
RUN mkdir /home/securecodebox/ \
22-
&& chown -R typo3scan:typo3scan /home/securecodebox/ /home/typo3scan/
23-
USER 1001
24-
WORKDIR /home/typo3scan/Typo3Scan
19+
COPY --from=base --chown=1001:1001 /Typo3Scan /home/typo3scan/
20+
21+
WORKDIR /home/typo3scan/
2522

26-
#Install Typo3Scan python requirements
23+
# Install Typo3Scan python requirements
2724
RUN python3 -m pip install -r requirements.txt
2825

29-
ENTRYPOINT [ "sh", "./wrapper.sh" ]
26+
# Switch work dir to scb folder so that the results get written there, and its available for local docker runs.
27+
WORKDIR /home/securecodebox/
28+
29+
USER 1001
30+
31+
ENTRYPOINT [ "python3", "/home/typo3scan/typo3scan.py" ]

‎scanners/typo3scan/scanner/wrapper.sh‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)