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