proxy uncloud.sock socket to tcp port when running machine in container

This commit is contained in:
Pavel Sviderski
2024-11-27 16:33:05 +10:00
parent a6ccd6055a
commit 871fd8c035
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -9,4 +9,8 @@ echo "Docker in Docker is ready."
echo "Loading corrosion image from /images/corrosion.tar..."
docker load < /images/corrosion.tar
# Make machine API accessible from the host via port publishing.
echo "Proxying Uncloud API port 51000/tcp to Unix socket /run/uncloud/uncloud.sock..."
socat TCP-LISTEN:51000,reuseaddr,fork,bind="$(hostname -i)" UNIX-CONNECT:/run/uncloud/uncloud.sock &
exec "$@"