File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,21 @@ ENV PYTHONPATH /app
3
3
ENV PYTHONUNBUFFERED 1
4
4
ENV PYTHONDONTWRITEBYTECODE 1
5
5
6
+ RUN groupadd --gid 5000 main \
7
+ && useradd --home-dir /home/main --create-home --uid 5000 \
8
+ --gid 5000 --shell /bin/sh --skel /dev/null main
9
+
6
10
COPY . /app
7
11
WORKDIR /app
8
12
9
13
# install curl; skipcq: DOK-DL3008
10
- RUN apt-get update && apt-get install -y curl git && apt-get clean && rm -rf /var/lib/apt/lists/*
14
+ RUN apt-get update && apt-get install --no-install-recommends - y curl git && apt-get clean && rm -rf /var/lib/apt/lists/*
11
15
SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
12
16
13
17
# download the DeepSource CLI binary
14
18
RUN curl https://deepsource.io/cli | bash
15
19
RUN ["chmod" , "777" , "/app/main.py" ]
16
20
21
+ USER main
22
+
17
23
CMD ["/app/main.py" ]
You can’t perform that action at this time.
0 commit comments