-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (28 loc) · 1009 Bytes
/
Dockerfile
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
# Run prospector static analysis using docker.
# Copyright (C) 2022 Okta, Inc.
# Licensed under the Apache License 2.0
#
# To run `prospector` against code in the current directory using the image
# from Docker Hub:
# $ docker run --rm -it -v ${PWD}:/app:ro,Z badpacketsllc/prospector
#
# To build from source:
# $ docker build -t prospector .
#
# To display the command line options:
# $ docker run --rm -it prospector --help
# .. will display the command line help
#
# To run `prospector` against code in the current directory using the image
# built locally from source:
# $ docker run --rm -it -v ${PWD}:/app:ro,Z prospector
FROM docker.io/python:3.10-alpine
WORKDIR /app
RUN adduser --disabled-password prospector prospector \
&& chown -R prospector:prospector /app \
&& rm -rf ${HOME}/.cache/ ${HOME}/.local/bin/__pycache__/
USER prospector
ENV PATH /home/prospector/.local/bin:${PATH}
RUN pip3 install --no-cache-dir --compile prospector[with_everything]
ENTRYPOINT ["prospector"]
CMD []