Having gone through different solutions provided on this platform and surfing the web, my error keeps popping up again and again.
I am inclined to drop my question this time around.
While running docker build -t myimage .
, I keep on seeing the following error output
...
#5 sha256:092586df92068bd6b59c497f379e48302aa1b27cf76b2de64d262ba7bc19e47b 2.10MB / 45.38MB 316.4s
#5 sha256:87fc2710b63fcf6c0a5c876b1b37773d9e949cb4d66eeb06889ef84f7b5a5a93 25.17MB / 214.83MB 964.5s
#5 DONE 966.7s
#7 [2/5] COPY . /app
#7 sha256:0930007e6ec71d357846ab0d691d72a68ae6ef349d84b3a69cec532b93def08c
#7 ERROR: failed to read expected number of bytes: unexpected EOF
------
> [2/5] COPY . /app:
------
failed to compute cache key: failed to read expected number of bytes: unexpected EOF
Here is my Dockerfile content:
FROM python:stretch
# Use the `python:3.7` as a source image from the Amazon ECR Public Gallery
# We are not using `python:3.7.2-slim` from Dockerhub because it has put a pull rate limit.
# FROM public.ecr.aws/sam/build-python3.7:latest
# FROM python:3.7
# Set up an app directory for your code
COPY . /app
WORKDIR /app
# Install `pip` and needed Python packages from `requirements.txt`
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Define an entrypoint which will run the main app using the Gunicorn WSGI server.
ENTRYPOINT ["gunicorn", "-b", ":8080", "main:APP"]
Also, this is my project structure:
CODEOWNERS
__pycache__/
buildspec.yml
main.py
test_main.py
Dockerfile
app/
ci-cd-codepipeline.cfn.yml
requirements.txt
README.md
aws-auth-patch.yml
iam-role-policy.json
simple_jwt_api.yml
venv/
I was asked to create app directory but this couldn't work. I would be pleased to have it resolved.
- Note: my docker desktop is running perfectly.