This commit is contained in:
Adam 2023-02-11 16:13:23 -05:00
parent fd2de6247b
commit c3696632dd
2 changed files with 5 additions and 6 deletions

View file

@ -1,10 +1,9 @@
# syntax-docker/dockerfile:1 # syntax-docker/dockerfile:1
FROM alpine FROM python:slim
WORKDIR /app WORKDIR /app
COPY requirements.txt requirements.txt 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 pip install --no-cache-dir -r requirements.txt
RUN apk del build-deps
RUN rm -rf /var/cache/apk/*
COPY . . COPY . .
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"] CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]

View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
docker buildx build --platform=linux/amd64 --tag chatbots_api --load . docker build --tag chatbots_api .
docker save chatbots_api | pigz > chatbots_api.tar.gz docker save chatbots_api | pigz > chatbots_api_$(uname -m).tar.gz