Docker-compose up -d nginx Error: Unable to find expected entry… [How to Solve]

When creating an nginx container on AliCloud ECS, the error is reported as above.

The solution:

In your Dockerfile, before running any apt commands, add the following line:

RUN printf "deb jessie main\ndeb-src jessie main\ndeb jessie/updates main\ndeb-src jessie/updates main" > /etc/apt/sources.list

This enables apt to run from the new sources.

It’s possible the debian:jesse Docker image will be updated to work correctly in the near future, but until then this will allow you to keep working


Similar Posts: