build
This commit is contained in:
parent
fd2de6247b
commit
c3696632dd
2 changed files with 5 additions and 6 deletions
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue