unable to run a Dockerfile

175 views Asked by At

i am unable to build a Dockerfile i am getting an error statiing that (DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/ubuntu/Dockerfile: no such file or directory)

can any one please guide me on this

i have tried to install buildx (apt buildx install) no luck

1

There are 1 answers

0
Zach Thill On

If docker is complaining about the legacy builder it means that you haven't created or bootstrapped a custom builder using the docker buildx create command. This is a prerequisite step before using buildx to create architecture specific and multi-arch images.

Ex:

docker buildx create --driver-opt image=moby/buildkit:latest --name multi-architecture-builder --use
docker buildx inspect --bootstrap

Here is the official docker documentation on the issue.