hackerrun 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -800,12 +800,6 @@ var ClusterManager = class {
800
800
  const setupScript = `#!/bin/bash
801
801
  set -e
802
802
 
803
- # Install jq if not present (needed to merge Docker config)
804
- if ! command -v jq &> /dev/null; then
805
- apt-get update -qq
806
- apt-get install -y -qq jq
807
- fi
808
-
809
803
  # Step 1: Add IPv6 support to Docker daemon config
810
804
  DAEMON_JSON='/etc/docker/daemon.json'
811
805
  if [ -f "$DAEMON_JSON" ]; then
@@ -846,21 +840,18 @@ systemctl restart docker
846
840
  sleep 3
847
841
 
848
842
  # Step 4: Recreate uncloud network with IPv6 enabled
849
- # Must stop containers first - can't remove network while containers are attached
850
843
  CONTAINERS=$(docker ps -aq --filter network=uncloud 2>/dev/null || true)
851
844
 
852
- if [ -n "$CONTAINERS" ]; then
853
- echo "Stopping containers on uncloud network..."
854
- docker stop $CONTAINERS 2>/dev/null || true
855
- fi
845
+ for container in $CONTAINERS; do
846
+ docker network disconnect uncloud "$container" 2>/dev/null || true
847
+ done
856
848
 
857
849
  docker network rm uncloud 2>/dev/null || true
858
850
  docker network create --driver bridge --subnet 10.210.0.0/24 --gateway 10.210.0.1 --ipv6 --subnet fd00:a10:210::/64 --gateway fd00:a10:210::1 uncloud
859
851
 
860
- if [ -n "$CONTAINERS" ]; then
861
- echo "Restarting containers..."
862
- docker start $CONTAINERS 2>/dev/null || true
863
- fi
852
+ for container in $CONTAINERS; do
853
+ docker network connect uncloud "$container" 2>/dev/null || true
854
+ done
864
855
 
865
856
  # Step 5: Start the iptables service
866
857
  systemctl start docker-ipv6-nat64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hackerrun",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "CLI tool to create and manage VMs using Ubicloud API",
5
5
  "type": "module",
6
6
  "bin": {