-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
21 lines (17 loc) · 942 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM ubuntu:20.04
RUN apt update && apt install -y \
curl wget \
python3-pip python3-dev python3-passlib python3-jwt \
libssl-dev libffi-dev zlib1g-dev libpq-dev \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python
# Install Docker from Docker Inc. repositories.
RUN curl -sSL https://get.docker.com/ | sh
# install pip packages
COPY requirements.txt /fastapi/requirements.txt
WORKDIR /fastapi
RUN pip install -r requirements.txt
# install gvisor
RUN ( set -e; ARCH=$(uname -m); URL=https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH}; wget ${URL}/runsc ${URL}/runsc.sha512 ${URL}/containerd-shim-runsc-v1 ${URL}/containerd-shim-runsc-v1.sha512; sha512sum -c runsc.sha512 -c containerd-shim-runsc-v1.sha512; rm -f *.sha512; chmod a+rx runsc containerd-shim-runsc-v1; mv runsc containerd-shim-runsc-v1 /usr/local/bin; ) \
&& /usr/local/bin/runsc install