1#!/bin/bash
2set -e
3export http_proxy=http://10.0.2.100:3128 https_proxy=http://10.0.2.100:3128
4export no_proxy=localhost,127.0.0.1,10.0.2.101
5systemctl disable --now systemd-resolved
6rm -f /etc/resolv.conf
7install -m 644 /opt/openclaw/resolv.conf /etc/resolv.conf
8if ! command -v docker >/dev/null; then
9 apt-get -o Acquire::Retries=10 update
10 DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io
11fi
12systemctl daemon-reload
13systemctl restart docker
14mkdir -p /opt/openclaw/state/workspace
15if ! test -f /opt/openclaw/state/openclaw.json; then
16 cp /opt/openclaw/openclaw.json /opt/openclaw/state/openclaw.json
17fi
18chown -R 1000:1000 /opt/openclaw/state
19chmod 700 /opt/openclaw/state
20docker build --build-arg http_proxy --build-arg https_proxy -t openclaw-trial - < /opt/openclaw/Dockerfile
21systemctl enable openclaw
22systemctl restart openclaw