-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (40 loc) · 1.07 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
FROM debian:11 AS build
WORKDIR /srv
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
gettext-base \
gzip \
npm \
rsync \
uglifyjs \
&& curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
&& gunzip elm.gz \
&& chmod +x elm \
&& mv elm /usr/local/bin/
COPY . /srv/
RUN ./build.sh -o
FROM debian:11
ENV DEBIAN_FRONTEND noninteractive
ENV LASTBUILD 2021100601
ENV LANG C.UTF-8
RUN set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends \
python3-aiofiles \
python3-jinja2 \
python3-pymongo \
python3-uvicorn \
uvicorn \
python3-fastapi \
python3-numpy \
python3-scipy \
python3-sympy \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY src/server.py /srv/src/server.py
COPY public /srv/public
COPY content /srv/content
COPY --from=build /srv/build/ /srv/build/
WORKDIR /srv/src
EXPOSE 8000
CMD ["uvicorn", "--host", "0.0.0.0", "server:api"]