diff --git a/src/en_US/docs/manual/quick-start.md b/src/en_US/docs/manual/quick-start.md index f470b54..c51f6a2 100644 --- a/src/en_US/docs/manual/quick-start.md +++ b/src/en_US/docs/manual/quick-start.md @@ -55,115 +55,30 @@ See [Deploy from Source Code](/en_US/docs/manual/source-code) for details. == Linux **Linux** -First, ensure your system has Docker installed. You can check by entering the following command +First, ensure your system has a container manager (such as `podman` or `docker`) and `adb` installed -``` bash -# For ROOT users -docker help -# For non-ROOT users with sudo privileges -sudo docker help -``` +Then, run `adb start-server` with root privileges -If the command outputs the following content, then your system has Docker +Next, run the container -::: details Command Output +::: details Docker Command ``` bash -Usage: docker [OPTIONS] COMMAND - -A self-sufficient runtime for containers - -Common Commands: - run Create and run a new container from an image - exec Execute a command in a running container - ps List containers - build Build an image from a Dockerfile - pull Download an image from a registry - push Upload an image to a registry - images List images - login Authenticate to a registry - logout Log out from a registry - search Search Docker Hub for images - version Show the Docker version information - info Display system-wide information - -Management Commands: - builder Manage builds - container Manage containers - context Manage contexts - image Manage images - manifest Manage Docker image manifests and manifest lists - network Manage networks - plugin Manage plugins - system Manage Docker - trust Manage trust on Docker images - volume Manage volumes - -Swarm Commands: - swarm Manage Swarm - -Commands: - attach Attach local standard input, output, and error streams to a running container - commit Create a new image from a container's changes - cp Copy files/folders between a container and the local filesystem - create Create a new container - diff Inspect changes to files or directories on a container's filesystem - events Get real time events from the server - export Export a container's filesystem as a tar archive - history Show the history of an image - import Import the contents from a tarball to create a filesystem image - inspect Return low-level information on Docker objects - kill Kill one or more running containers - load Load an image from a tar archive or STDIN - logs Fetch the logs of a container - pause Pause all processes within one or more containers - port List port mappings or a specific mapping for the container - rename Rename a container - restart Restart one or more containers - rm Remove one or more containers - rmi Remove one or more images - save Save one or more images to a tar archive (streamed to STDOUT by default) - start Start one or more stopped containers - stats Display a live stream of container(s) resource usage statistics - stop Stop one or more running containers - tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE - top Display the running processes of a container - unpause Unpause all processes within one or more containers - update Update configuration of one or more containers - wait Block until one or more containers stop, then print their exit codes - -Global Options: - --config string Location of client config files (default "/root/.docker") - -c, --context string Name of the context to use to connect to the daemon (overrides - DOCKER_HOST env var and default context set with "docker context use") - -D, --debug Enable debug mode - -H, --host list Daemon socket to connect to - -l, --log-level string Set the logging level ("debug", "info", "warn", "error", "fatal") - (default "info") - --tls Use TLS; implied by --tlsverify - --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem") - --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem") - --tlskey string Path to TLS key file (default "/root/.docker/key.pem") - --tlsverify Use TLS and verify the remote - -v, --version Print version information and quit - -Run 'docker COMMAND --help' for more information on a command. - -For more help on how to use Docker, head to https://docs.docker.com/go/guides/ -``` +sudo docker run -d \ + -v /path/to/configs:/app/BAAH/BAAH_CONFIGS \ + --net=host \ + --restart=always \ + --name BAAH \ + ghcr.io/bluearchivearishelper/baah:latest ::: -Then, pull the image, create and run the container. - +::: details Podman Command ``` bash -docker run -d --name BAAH -p 8000:8000 ghcr.io/BlueArchiveArisHelper/baah:latest -``` - -Then open your browser and navigate to `http://:8000` - -In Server Configuration, select your BA server. - -In Emulator Configuration, modify the port number to your emulator's ADB debugging port. (If you are using an emulator) - -In Task Execution Order, enable the task flow or click the Quick Call Task button to run tasks. +sudo docker run -d \ + -v /path/to/configs:/app/BAAH/BAAH_CONFIGS \ + --net=host \ + --restart=always \ + --name BAAH \ + ghcr.io/bluearchivearishelper/baah:latest +::: :::: diff --git a/src/en_US/docs/manual/source-code.md b/src/en_US/docs/manual/source-code.md index f659623..c7ecc1b 100644 --- a/src/en_US/docs/manual/source-code.md +++ b/src/en_US/docs/manual/source-code.md @@ -115,3 +115,22 @@ Execute `python jsoneditor.py config.json` to start BAAH according to the config ## Installing from Source Archive No need to install Git, download the **source code zip** and extract it to the desired folder. Open the terminal in the BAAH source code folder, then install dependencies and run. + +## Manual Container Building + +BAAH provides a standalone `Dockerfile`, allowing you to build the container without cloning the repository + +Build commands are as follows + +``` bash +# Download Dockerfile +wget https://github.com/BlueArchiveArisHelper/BAAH/raw/refs/heads/main/Dockerfile + +# If network is poor, run the following command +wget https://v6.gh-proxy.com/github.com/BlueArchiveArisHelper/BAAH/raw/refs/heads/main/Dockerfile.CN + +sudo docker build -f -t baah:localbuild . + +# If you are using podman, use the following command +sudo docker build -f -t baah:localbuild . +``` \ No newline at end of file diff --git a/src/zh_CN/docs/manual/quick-start.md b/src/zh_CN/docs/manual/quick-start.md index f4ec26e..64f72a5 100644 --- a/src/zh_CN/docs/manual/quick-start.md +++ b/src/zh_CN/docs/manual/quick-start.md @@ -54,115 +54,32 @@ description: 3 步完成 BlueArchive Aris Helper 部署!MuMu 模拟器设置 == Linux **Linux** -首先,确保你的系统内包含Docker,可以输入一下命令查看 +首先,确保你的电脑内存在容器管理器(如 `podman`,`docker`)和 `adb` -``` bash -# 对于ROOT用户 -docker help -# 对于非ROOT,但是拥有sudo权限的用户 -sudo docker help -``` +然后,使用root权限运行 `adb start-server` -如果命令输出了以下内容,则你的系统包含Docker +接下来,运行容器 -::: details 命令输出 +::: details Docker命令 ``` bash -Usage: docker [OPTIONS] COMMAND - -A self-sufficient runtime for containers - -Common Commands: - run Create and run a new container from an image - exec Execute a command in a running container - ps List containers - build Build an image from a Dockerfile - pull Download an image from a registry - push Upload an image to a registry - images List images - login Authenticate to a registry - logout Log out from a registry - search Search Docker Hub for images - version Show the Docker version information - info Display system-wide information - -Management Commands: - builder Manage builds - container Manage containers - context Manage contexts - image Manage images - manifest Manage Docker image manifests and manifest lists - network Manage networks - plugin Manage plugins - system Manage Docker - trust Manage trust on Docker images - volume Manage volumes - -Swarm Commands: - swarm Manage Swarm - -Commands: - attach Attach local standard input, output, and error streams to a running container - commit Create a new image from a container's changes - cp Copy files/folders between a container and the local filesystem - create Create a new container - diff Inspect changes to files or directories on a container's filesystem - events Get real time events from the server - export Export a container's filesystem as a tar archive - history Show the history of an image - import Import the contents from a tarball to create a filesystem image - inspect Return low-level information on Docker objects - kill Kill one or more running containers - load Load an image from a tar archive or STDIN - logs Fetch the logs of a container - pause Pause all processes within one or more containers - port List port mappings or a specific mapping for the container - rename Rename a container - restart Restart one or more containers - rm Remove one or more containers - rmi Remove one or more images - save Save one or more images to a tar archive (streamed to STDOUT by default) - start Start one or more stopped containers - stats Display a live stream of container(s) resource usage statistics - stop Stop one or more running containers - tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE - top Display the running processes of a container - unpause Unpause all processes within one or more containers - update Update configuration of one or more containers - wait Block until one or more containers stop, then print their exit codes - -Global Options: - --config string Location of client config files (default "/root/.docker") - -c, --context string Name of the context to use to connect to the daemon (overrides - DOCKER_HOST env var and default context set with "docker context use") - -D, --debug Enable debug mode - -H, --host list Daemon socket to connect to - -l, --log-level string Set the logging level ("debug", "info", "warn", "error", "fatal") - (default "info") - --tls Use TLS; implied by --tlsverify - --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem") - --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem") - --tlskey string Path to TLS key file (default "/root/.docker/key.pem") - --tlsverify Use TLS and verify the remote - -v, --version Print version information and quit - -Run 'docker COMMAND --help' for more information on a command. - -For more help on how to use Docker, head to https://docs.docker.com/go/guides/ +sudo docker run -d \ + -v /path/to/configs:/app/BAAH/BAAH_CONFIGS \ + --net=host \ + --restart=always \ + --name BAAH \ + ghcr.io/bluearchivearishelper/baah:latest ``` ::: -然后,拉取镜像,创建并运行容器。 - +::: details Podman命令 ``` bash -docker run -d --name BAAH -p 8000:8000 ghcr.io/BlueArchiveArisHelper/baah:latest +sudo docker run -d \ + -v /path/to/configs:/app/BAAH/BAAH_CONFIGS \ + --net=host \ + --restart=always \ + --name BAAH \ + ghcr.io/bluearchivearishelper/baah:latest ``` - -随后打开浏览器,打开 `http://:8000` - -在服务器设置中,选择你游玩的ba服务器。 - -如果使用的是模拟器,请在模拟器设置中,修改端口号为你的模拟器adb调试端口 - -在任务执行顺序设置中,启用任务流或点击快速执行按钮运行任务。 +::: :::: \ No newline at end of file diff --git a/src/zh_CN/docs/manual/source-code.md b/src/zh_CN/docs/manual/source-code.md index 2444401..43b4273 100644 --- a/src/zh_CN/docs/manual/source-code.md +++ b/src/zh_CN/docs/manual/source-code.md @@ -93,7 +93,7 @@ brew install git # 如果你连接 GitHub 的网络良好,运行这个 git clone https://github.com/BlueArchiveArisHelper/BAAH.git # 如果不好,运行下列内容 -git clone https://gh-proxy.com/BlueArchiveArisHelper/BAAH.git +git clone https://v6.gh-proxy.com/github.com/BlueArchiveArisHelper/BAAH.git ``` 不要关闭窗口,运行 `cd BAAH` 进入文件夹,安装依赖。 @@ -111,4 +111,23 @@ pip install -r requirements.txt ## 从源码归档安装 -不用安装Git,下载 **source code zip** 然后解压到想要的文件夹,在BAAH源代码文件夹中打开终端,然后安装依赖,运行即可。 \ No newline at end of file +不用安装Git,下载 **source code zip** 然后解压到想要的文件夹,在BAAH源代码文件夹中打开终端,然后安装依赖,运行即可。 + +## 手动构建容器 + +BAAH提供单独使用 `Dockerfile` ,你可以不用克隆仓库就可以构建容器 + +构建命令如下 + +``` bash +# 下载Dockerfile +wget https://github.com/BlueArchiveArisHelper/BAAH/raw/refs/heads/main/Dockerfile + +# 如果网络不佳,则运行下列命令 +wget https://v6.gh-proxy.com/github.com/BlueArchiveArisHelper/BAAH/raw/refs/heads/main/Dockerfile.CN + +sudo docker build -f <你下载的Dockerfile> -t baah:localbuild . + +#如果你使用的是podman,则使用下列命令 +sudo docker build -f <你下载的Dockerfile> -t baah:localbuild . +``` \ No newline at end of file