Home > Blockchain >  failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error
failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error

Time:08-13

I want to dockerize django on windows, but i got This error:

(venv) PS J:\> docker build -t django .
[ ] Building 0.4s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                                            0.1s 
 => => transferring dockerfile: 32B                                                                                             0.0s 
 => [internal] load .dockerignore                                                                                               0.1s 
 => => transferring context: 2B                                                                                                 0.0s 
failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 1: FROM requires either one or three arguments
(venv) PS J:\django-ad\Django-Advance-blog> 

Dockerfile is:

FROM python:3.8 slim buster
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

WORKDIR ./app
COPY requirements.txt /app/
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
COPY ./core /app

CMD ["python","manage.py","runserver","0.0.0.0:8000"]

System info:

Edition Windows 10 Pro
Version 21H1
Installed on    ‎4/‎26/‎2021
OS build    19043.1889
Experience  Windows Feature Experience Pack 120.2212.4180.0

CodePudding user response:

Change:

FROM python:3.8 slim buster

Into:

FROM python:3.8-slim-buster

  • Related