-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 810 Bytes
/
Dockerfile
File metadata and controls
32 lines (26 loc) · 810 Bytes
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
FROM python:3.7-bullseye as base_build
# Do not buffer python's stdout or stderr
ENV PYTHONUNBUFFERED 1
# Create the app directory
RUN mkdir /app
WORKDIR /app
ADD requirements.txt /app/
ADD requirements_dev.txt /app/
RUN pip install -r requirements_dev.txt
FROM base_build as webserver
EXPOSE 8000
# https://github.com/climu/openstudyroom/issues/267
RUN rm -r /usr/local/lib/python3.7/site-packages/machina/locale
ADD run.sh /app/
CMD ["./run.sh"]
FROM base_build as dev
ADD requirements_dev.txt /app/
RUN pip install -r requirements_dev.txt
RUN apt-get update -y
RUN apt-get install -y gettext
# https://github.com/climu/openstudyroom/issues/267
RUN rm -r /usr/local/lib/python3.7/site-packages/machina/locale
FROM dev as cli
ENTRYPOINT /bin/bash
FROM dev as ruff
ENTRYPOINT /usr/local/bin/ruff check .