forked from RhinoSecurityLabs/pacu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
39 lines (29 loc) · 980 Bytes
/
Dockerfile.dev
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
35
36
37
38
39
# syntax = docker/dockerfile:1.2
FROM python:3.9-alpine3.12
LABEL maintainer="Rhino Assessment Team <[email protected]>"
LABEL pacu.version="1.6.0"
RUN apk add --no-cache aws-cli
# Install Pacu
WORKDIR /usr/src/pacu/
ENV PYTHONPATH /usr/src/pacu/
# Install dev requirements
RUN --mount=type=cache,target=/var/cache/apk apk add \
gcc \
build-base \
musl-dev \
linux-headers \
libffi-dev \
openssl-dev \
rust \
cargo \
make \
bash
RUN --mount=type=cache,target=/root/.cache/pip python -m pip install --upgrade pip
RUN --mount=type=cache,target=/root/.cache/pip pip install poetry
RUN echo 'AWS_EC2_METADATA_DISABLED=true' >> /etc/profile
COPY ./requirements* ./pyproject.toml ./poetry.lock ./
# Some IDE's will override the entrypoint so install everything globally
RUN poetry export --without-hashes --dev -o /tmp/requirements-dev.txt && \
pip install -r /tmp/requirements-dev.txt
COPY ./ ./
ENTRYPOINT ["bash", "-l"]