Having finished my FastAPI app, I need to deploy it. Note: never have I done this before, so sorry if the question is stupid.
I have created a Dockerfile
:
FROM python:3.12
RUN mkdir /webapp
WORKDIR /webapp
COPY requirements.txt .
RUN pip3 install --upgrade setuptools
RUN pip3 install -r requirements.txt
COPY . .
CMD gunicorn app:app
I try to run it with a command:
docker build . -t webapp:latest
But I have this error appear:
ERROR: Cannot connect to the Docker daemon at unix:///Users//.docker/run/docker.sock. Is the docker daemon running?
What’s wrong? Ready to provide any other info if necessary