forked from prospector-dev/prospector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 928 Bytes
/
Dockerfile
File metadata and controls
29 lines (23 loc) · 928 Bytes
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
FROM python:3
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
&& apt-get -y install git locales gcc g++ sudo procps lsb-release \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ARG USERNAME=prospector-dev
RUN useradd -m $USERNAME
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
RUN chmod 0440 /etc/sudoers.d/$USERNAME
RUN echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config
RUN mkdir -p /workspaces/prospector
RUN chown -Rf 1000:1000 /workspaces/prospector
COPY --chown=1000:1000 . /workspaces/prospector/
ENV HOME /workspaces/prospector
USER $USERNAME
WORKDIR /workspaces/prospector/
RUN sudo python3 -m pip install --no-cache-dir -e .[with_everything]
RUN sudo python3 -m pip install --no-cache-dir pre-commit rope
RUN pre-commit install
ENV DEBIAN_FRONTEND=dialog