LazyBone's blog

January 11, 2025

docker-build

OpsTool1.8 min to read

docker build

error message

docker build -t supabase-wake . in windows, if you not install docker-desktop, when I build docker get the error

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/

error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Post "http://%2F%2F.%2Fpipe%2Fdocke
r_engine/v1.47/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0
&memswap=0&networkmode=default&rm=1&shmsize=0&t=supabase-wake&target=&ulimits=%5B%5D&version=1": open //./pipe/docker_engine: The system cannot find the file specified.

because windows container and linux container exist compatibility issues.

solve

open docker daemon(it's name is dockererd)

  1. if you need run docker service, you need manual run dockererd (need administraor permission)
  2. use wsl open daemon build it. Maybe hyperV,wsl is best method,but I only used docker:( Imagine opening more containers just to simplify the containers. This is crazy for me. I don't want to waste resources like this.

docker environment varible

best practices is:

docker push

push need login account,take a tag, then you can push it.