From c3696632dd4168debb6d316d4081290860004668 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Sat, 11 Feb 2023 16:13:23 -0500 Subject: [PATCH] build --- api/Dockerfile | 7 +++---- api/build | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 62f30b1..e6f1987 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,10 +1,9 @@ # syntax-docker/dockerfile:1 -FROM alpine +FROM python:slim WORKDIR /app COPY requirements.txt requirements.txt -RUN apk add --no-cache --virtual build-deps py3-pip rust cargo g++ openssl-dev python3-dev +ENV PYTHONUNBUFFERED=1 RUN pip install --no-cache-dir -r requirements.txt -RUN apk del build-deps -RUN rm -rf /var/cache/apk/* + COPY . . CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"] diff --git a/api/build b/api/build index b110c1e..249fdc6 100755 --- a/api/build +++ b/api/build @@ -1,5 +1,5 @@ #!/bin/bash -docker buildx build --platform=linux/amd64 --tag chatbots_api --load . -docker save chatbots_api | pigz > chatbots_api.tar.gz +docker build --tag chatbots_api . +docker save chatbots_api | pigz > chatbots_api_$(uname -m).tar.gz