-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (35 loc) · 1.06 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
FROM node:alpine as frontend-builder
RUN mkdir -p /app
WORKDIR /app
ADD frontend/package.json .
RUN npm install
ADD frontend .
RUN npm run build
FROM alpine
RUN apk add --no-cache python3 \
python3-dev \
build-base \
git && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
pip3 install sanic && \
apk del python3-dev \
build-base \
git && \
rm -r /root/.cache
WORKDIR /app
ADD requirements.txt .
RUN pip install -r requirements.txt
#This is a really dirty hack as it seems to DynamicMessage ProgressBar Widget only supports numbers
WORKDIR /usr/lib/python3.6/site-packages/progressbar
RUN sed -i 's/:6.3g//g' widgets.py && \
pip3 uninstall --yes pip
RUN adduser -D registry && chown registry /app
USER registry
WORKDIR /app
COPY --from=frontend-builder /app/build ./frontend/build/
ADD registryclient.py main.py ./
ADD helpers ./helpers
ADD api ./api
ENTRYPOINT ["/usr/bin/python3", "main.py"]