git init
This commit is contained in:
commit
4693550fb2
|
@ -0,0 +1,23 @@
|
|||
FROM ubuntu:24.04
|
||||
ARG proxy git_link git_name
|
||||
ENV http_proxy=$proxy \
|
||||
https_proxy=$proxy \
|
||||
PATH=/app/bin:$PATH
|
||||
WORKDIR /app
|
||||
RUN cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak \
|
||||
&& echo "# 阿里云 Ubuntu 24.04 镜像源" > /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& echo "Types: deb" >> /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& echo "URIs: http://mirrors.aliyun.com/ubuntu-ports/" >> /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& echo "Suites: noble noble-updates noble-security" >> /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& echo "Components: main restricted universe multiverse" >> /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& apt update && apt upgrade -y && apt install -y wget tar jq git docker.io python3 python-is-python3 docker-compose-v2 adb
|
||||
RUN mkdir -p /app/MaaAssistantArknights && mkdir -p /app/bin && mkdir -p /app/redroid-log \
|
||||
&& wget $(wget -qO- https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/releases/latest | jq -r '.assets[] | select(.name | test("linux-aarch64.tar.gz$")) | .browser_download_url') \
|
||||
-O MAA-latest-linux-aarch64.tar.gz && tar -zxvf MAA-latest-linux-aarch64.tar.gz -C /app/MaaAssistantArknights \
|
||||
&& ln -s /app/MaaAssistantArknights/maa /app/bin/maa
|
||||
RUN maa install
|
||||
RUN git clone $git_link && ln -s /app/$git_name/run_all.sh /app/bin/run_all.sh
|
||||
|
||||
#CMD ["tail","-f","/dev/null"]
|
||||
CMD [ "run_all.sh" ]
|
|
@ -0,0 +1,3 @@
|
|||
变量的转递主要通过.env 因为仅是个人使用 部分定义不规范
|
||||
本项目不包括redroid的安装和配置
|
||||
关于redroid 还需查看github相关仓库信息
|
|
@ -0,0 +1,24 @@
|
|||
#version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: lichx/maa-container:v1.0
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
proxy: ${PROXY}
|
||||
git_link: ${GIT_LINK}
|
||||
git_name: ${GIT_NAME}
|
||||
environment:
|
||||
- redroid_path=${REDROID_PATH}
|
||||
- adb_address=${ADB_ADDRESS}
|
||||
- MAA_CONFIG_DIR=${MAA_CONFIG_DIR}
|
||||
- MAA_LOG=${MAA_LOG}
|
||||
volumes:
|
||||
- ~/.config/redroid-rk3588:/app/redroid-rk3588
|
||||
- ~/redroid-data:/home/ubuntu/redroid-data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ~/.config/redroid-log:/app/redroid-log
|
||||
|
||||
# network_mode: host
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
cd $(dirname $(readlink -f "$0"))
|
||||
docker compose up -d
|
Loading…
Reference in New Issue