-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (13 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
22 lines (13 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10.4-slim-buster
# Embed the current git commit in the runner image so that git is not required.
ARG GIT_COMMIT
ENV GIT_COMMIT=$GIT_COMMIT
# Quicker logging, no buffer to go through first!
ENV PYTHONUNBUFFERED=TRUE
WORKDIR /app
COPY requirements.txt ./
RUN bash -c 'apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl && if [ $(dpkg --print-architecture) == "armhf" ] || [ $(dpkg --print-architecture) == "armel" ]; then DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc g++ && rm -rf /var/lib/apt/lists/*; fi' && sh -c "curl https://sh.rustup.rs -sSf | sh -s -- -y" && pip install -r requirements.txt
COPY . .
ENV PORT=80
EXPOSE $PORT
CMD ["python", "server.py"]