|
|
|
FROM ubuntu:20.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y \ |
|
curl \ |
|
gnupg \ |
|
python3 \ |
|
python3-pip \ |
|
libpq-dev \ |
|
&& apt-get clean \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN curl -fsSL https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-archive-keyring.gpg \ |
|
&& echo "deb [signed-by=/usr/share/keyrings/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \ |
|
&& apt-get update \ |
|
&& apt-get install -y skopeo \ |
|
&& apt-get clean \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
RUN pip3 install fastapi uvicorn |
|
|
|
COPY --chown=user . /app |
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |