forked from nornir-automation/nornir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 664 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
ARG PYTHON
FROM python:${PYTHON}-slim-stretch
ENV PATH="/root/.poetry/bin:$PATH" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
NORNIR_TESTS=1
RUN apt-get update \
&& apt-get install -yq curl git pandoc make \
&& curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python \
&& poetry config virtualenvs.create false
COPY pyproject.toml .
COPY poetry.lock .
# Dependencies change more often, so we break RUN to cache the previous layer
RUN poetry install --no-interaction
ARG NAME
WORKDIR /${NAME}
COPY . .
# Install the project as a package
RUN poetry install --no-interaction
CMD ["/bin/bash"]