安装
使用官方脚本安装我的服务器不行
官方脚本
mkdir instantbox && cd $_
bash <(curl -sSL https://raw.githubusercontent.com/instantbox/instantbox/master/init.sh)
下面是我的完整安装过程
mkdir /opt/instantbox
cd /opt/instantbox
1.脚本文件 (这个没用,只是官方脚本会下载这个文件)
vim init.sh
内容如下
#!/bin/sh
#
# Install script for instantbox
# Home Page: https://github.com/instantbox/instantbox
#
# Usage:
# mkdir instantbox && cd $_
# bash <(curl -sSL https://raw.githubusercontent.com/instantbox/instantbox/master/init.sh)"
# docker-compose up -d
#check_cmd() {command -v "$1" >/dev/null 2>&1
}echo "Welcome to instantbox, please wait..."
echo ""if check_cmd docker; thenecho "docker is installed"
elseecho "docker is not installed, please try again after it's installed"exit 1
fiif check_cmd docker-compose; thenecho "docker-compose is installed"
elsecurl -sSL https://raw.githubusercontent.com/docker/compose/master/script/run/run.sh > /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-compose || exit 1
ficurl -sSLO https://raw.githubusercontent.com/instantbox/instantbox/master/docker-compose.ymlecho "Enter your IP (optional): "
read IP
echo "Choose a port (default: 8888): "
read PORT[ -z "$IP" ] || sed -i -e "s/SERVERURL=$/SERVERURL=$IP/" docker-compose.yml
[ -z "$PORT" ] || sed -i -e "s/8888:80/$PORT:80/" docker-compose.ymlecho "You're all set! "
echo "Run 'docker-compose up -d' then go to http://${IP:-localhost}:${PORT:-8888} on your browser."
2.编写docker-conpose.yml
vim docker-conpose.yml
内容如下
version: '3'services:server:image: instantbox/instantbox:latestcontainer_name: instantbox_servervolumes:- /var/run/docker.sock:/var/run/docker.sockenvironment:- SERVERURL=networks:- instantbox_netfrontend:image: instantbox/instantbox-frontend:latestcontainer_name: instantbox_frontendlinks:- serverports:- 8888:80networks:- instantbox_netcron:image: instantbox/cron:latestcontainer_name: instantbox_cronlinks:- frontendenvironment:- CRON_STRINGS=* * * * * wget -qO /dev/null http://frontend/api/v2/superinspire/prunenetworks:- instantbox_netnetworks:instantbox_net:
启动
docker compose up -d
使用
浏览器打开
http://192.168.168.111:8888/
1.首页
2.选择系统
3.使用
创建后直接可以使用
和一般的linux系统没有任何区别