-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
67 lines (50 loc) · 1.37 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM python:3.8-slim-bullseye as base
# Update pip in the base image since we'll use it everywhere
RUN pip install -U pip
#######################
## Tool Installation ##
#######################
FROM base as builder
RUN : \
&& apt-get update \
&& apt-get install \
-y --no-install-recommends \
curl \
git \
make \
vim \
g++ \
gnupg \
gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
#########################
## Python Dependencies ##
#########################
COPY dev-requirements.txt dev-requirements.txt
RUN pip install -r dev-requirements.txt
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
###############################
## General Application Setup ##
###############################
COPY . /fideslang
WORKDIR /fideslang
# Immediately flush to stdout, globally
ENV PYTHONUNBUFFERED=TRUE
# Enable detection of running within Docker
ENV RUNNING_IN_DOCKER=TRUE
###################################
## Application Development Setup ##
###################################
FROM builder as dev
# Install fideslang as a symlink
RUN pip install -e ".[all]"
##################################
## Production Application Setup ##
##################################
FROM builder as prod
# Install without a symlink
RUN python -m pip install build
RUN python -m build
RUN pip install dist/fideslang-*.tar.gz