Hi ,
I’m trying to run the command Docker compose up but its giving me an error
2023/02/05 11:05:04 http2: server: error reading preface from client //./pipe/docker_engine: bogus greeting "400 Bad Request: invalid"
[+] Building 5.0s (2/2) FINISHED
=> ERROR [internal] load build definition from Dockerfile 5.0s
=> CANCELED [internal] load .dockerignore 4.9s
------
> [internal] load build definition from Dockerfile:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: no active session for s3zt9yo36jug63138a4oo05yk: context deadline exceeded
Dockerfile
FROM python:3.10.9-bullseye
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
RUN pip install --upgrade pip
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/
Docker-compose.yml
services:
web:
build: .
command: python /code/educa/manage.py runserver 0.0.0.0:8000
restart: always
volumes:
- .:/code
ports:
- "8000:8000"
environment:
- DJANGO_SETTINGS_MODULE=educa.settings.prod
Project structure
My Docker version is
Docker version 20.10.22, build 3a2c30b
and OS build is
Microsoft windows Version 22H2 (OS Build 19045.2486)
Running the command(docker compose up) from the main eLearning directory.
Please help me as to which settings need to be tweaked…so that my docker image is created and run in local