I'm trying to use Docker for the first time for my Django project using the book "Django For Professionals", but I am keep on getting build errors when I type "Docker build ." for a few days. I have looked at other stack overflow posts(An error, "failed to solve with frontend dockerfile.v0") but it still does not work. Here is the error code that I get.
$> docker build .
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 419B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
failed to solve with frontend dockerfile.v0: failed to create LLB definition: file with no instructions
$> export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
$> docker build .
Sending build context to Docker daemon 179.2kB
Error response from daemon: failed to parse Dockerfile: file with no instructions
I have my Dockerfile within my Django project and it is as follows:
FROM python:3.8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /code
COPY Pipfile Pipfile.lock /code/
RUN pip install pipenv && pipenv install --system
COPY . /code/
I tried cat Dockerfile and here is the output:
yoonjaeseo@Yoons-MacBook-Pro hello % cat Dockerfile
WORKDIR /coderectory 1ECODE 1
COPY . /code/%
Please let me know if any additional information is needed. Thank you!