我想在Windows上本地设置supabase主机,我已经下载并安装了docker。我第一次尝试
--- # Get the code
git clone --depth 1 https://github.com/supabase/supabase
# Go to the docker folder
cd supabase/docker
# Copy the fake env vars
cp .env.example .env
# Pull the latest images
docker compose pull
# Start the services (in detached mode)
docker compose up -d
没成功。然后我就用了
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
但是运行这些命令后,我运行时出现错误
supabase init
2024-09-25T14:12:08.141952Z INFO vector::app: All sources have finished.
2024-09-25T14:12:08.141974Z INFO vector: Vector has stopped.
2024-09-25T14:12:08.143702Z INFO vector::topology::running: Shutting down... Waiting on running components. remaining_components="logflare_kong, logflare_storage, logflare_db, logflare_realtime, logflare_functions, logflare_auth, logflare_rest" time_remaining="59 seconds left"
Stopping containers...
supabase_vector_hisri container is not ready: unhealthy
Try rerunning the command with --debug to troubleshoot the error.
运行后出错
supabase init --debug
2024/09/25 14:48:45 Recv First Byte
Stopping containers...
Pruned containers: [b6b5d6103eccd0c5d323ca5db9ae046a6215041584ee55f6ea34fcbf2c0a8052 f6174510124082b4cb31503040fd8c8ede7bd7ff6e59a98f04dae7fad1fd7e7b 561670bc4ce307632f85a4be3a15929ef9b45bc07cd5a04c315e04a876750a30]
Pruned volumes: [supabase_db_hisri supabase_config_hisri]
Pruned network: [supabase_network_hisri]
failed to create docker container: Error response from daemon: Conflict. The container name "/supabase_vector_hisri" is already in use by container "561670bc4ce307632f85a4be3a15929ef9b45bc07cd5a04c315e04a876750a30". You have to remove (or rename) that container to be able to reuse that name.
我寻找了删除所有内容并重新安装的命令,但我得到的所有命令都没有删除任何内容。事实上,那些命令是 Windows 无法识别的。
我遇到了同样的问题,为我解决的方法是清除 docker 中的缓存。我在启动容器时遇到问题,并且它没有正确关闭,因此当我重新运行程序并收到该错误时。因此,如果您在遇到该错误之前运行时也遇到问题,那么您可能需要清除 docker 缓存。您可以在 docker 桌面的调试选项卡中访问它。