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)
- if you need run docker service, you need manual run
dockererd
(need administraor permission) - 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:
- Write a
.env
file,when run images append param--env-file .env
- example:
docker run -d --env-file .env --name my-running-app my-python-app
.env
file content like:
# .env file SUPABASE_URL=your secret url SUPABASE_KEY=your secret key
- example:
- Choose the appropriate dependency version many software image have many distribution, some lighting, some stable,select your needs.
docker push
push need login account,take a tag, then you can push it.