forked from ion2088/firedust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 894 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
FROM python:3 AS stage
WORKDIR /workspaces/firedust
# Env variables and dep versions
ENV POETRY_VERSION=1.6 \
APP="firedust" \
PYTHONPATH="${PYTHONPATH}:/workspaces/firedust/src" \
PATH="$PATH:/root/.poetry/bin"
# Install poetry and copy pyproject
RUN pip install poetry=="$POETRY_VERSION"
COPY pyproject.toml poetry.lock ./
# --------------------------------------------------
# Dev image
# --------------------------------------------------
FROM stage as firedust-dev
ENV PATH="/home/vscode/local/bin:$PATH" \
ENV="local"
# Install development dependencies
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/* && \
poetry install
# Git configuration
RUN git config --global --add safe.directory /workspaces/firedust && \
git config --global user.email "$DEV_EMAIL" && \
git config --global user.name "$DEV_NAME"
COPY . .