Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
docker-mirai-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
docker-mirai-cqhttp
Commits
cd3e3b0d
Commit
cd3e3b0d
authored
Apr 30, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish novnc
parent
db30e84d
Pipeline
#3069
passed with stage
in 5 minutes and 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
6 deletions
+40
-6
Dockerfile.novnc
Dockerfile.novnc
+4
-3
README.md
README.md
+30
-2
pm2-novnc.json
pm2-novnc.json
+6
-1
No files found.
Dockerfile.novnc
View file @
cd3e3b0d
...
@@ -2,7 +2,7 @@ ARG BASE_IMAGE=git-registry.mycard.moe/nanahira/docker-mirai-cqhttp:x
...
@@ -2,7 +2,7 @@ ARG BASE_IMAGE=git-registry.mycard.moe/nanahira/docker-mirai-cqhttp:x
FROM ${BASE_IMAGE}
FROM ${BASE_IMAGE}
RUN apt update && \
RUN apt update && \
apt -y install python3 git x11vnc xvfb socat npm && \
apt -y install python3 git x11vnc xvfb socat
fluxbox
npm && \
npm install -g pm2 && \
npm install -g pm2 && \
git clone --depth=1 https://github.com/kanaka/noVNC.git /usr/src/noVNC && \
git clone --depth=1 https://github.com/kanaka/noVNC.git /usr/src/noVNC && \
git clone --depth=1 https://github.com/kanaka/websockify.git /usr/src/noVNC/utils/websockify \
git clone --depth=1 https://github.com/kanaka/websockify.git /usr/src/noVNC/utils/websockify \
...
@@ -18,8 +18,9 @@ ENV HOME=/root \
...
@@ -18,8 +18,9 @@ ENV HOME=/root \
LANGUAGE=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=425 \
DISPLAY_WIDTH=500 \
DISPLAY_HEIGHT=900
DISPLAY_HEIGHT=900 \
VNC_PASS=nanahira
#COPY ./novnc-supervisord.conf /etc/supervisor/conf.d/supervisord.conf
#COPY ./novnc-supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./pm2-novnc.json /usr/src/app/pm2-novnc.json
COPY ./pm2-novnc.json /usr/src/app/pm2-novnc.json
...
...
README.md
View file @
cd3e3b0d
...
@@ -8,6 +8,30 @@ https://github.com/purerosefallen/docker-mirai-cqhttp
...
@@ -8,6 +8,30 @@ https://github.com/purerosefallen/docker-mirai-cqhttp
## 建议 docker-compose
## 建议 docker-compose
### `novnc` 镜像
```
yaml
version
:
'
2.4'
services
:
cqhttp
:
restart
:
always
image
:
git-registry.mycard.moe/nanahira/docker-mirai-cqhttp:novnc
ports
:
-
'
6700:6700'
volumes
:
-
./data:/usr/src/app/data
-
./config:/usr/src/app/config
-
./bots:/usr/src/app/bots
environment
:
QQ_ID
:
11111111
QQ_PASS
:
change_me
WS_PORT
:
6700
WS_TOKEN
:
change_me
VNC_PASS
:
change_me
```
### `x` 镜像
```
yaml
```
yaml
version
:
'
2.4'
version
:
'
2.4'
services
:
services
:
...
@@ -30,7 +54,6 @@ services:
...
@@ -30,7 +54,6 @@ services:
-
./config:/usr/src/app/config
-
./config:/usr/src/app/config
-
./bots:/usr/src/app/bots
-
./bots:/usr/src/app/bots
stdin_open
:
true
stdin_open
:
true
command
:
java -jar mcl.jar
environment
:
environment
:
DISPLAY
:
novnc:0.0
DISPLAY
:
novnc:0.0
QQ_ID
:
11111111
QQ_ID
:
11111111
...
@@ -49,7 +72,9 @@ services:
...
@@ -49,7 +72,9 @@ services:
*
`latest`
无 GUI 镜像。需要有现成的
`devices.json`
文件。
*
`latest`
无 GUI 镜像。需要有现成的
`devices.json`
文件。
*
`x`
**推荐。**
带 GUI 镜像,需要配合 noVNC 使用以拉滑块。
*
`x`
带 GUI 镜像,需要配合 noVNC 使用以拉滑块。
*
`novnc`
带 GUI 和 noVNC 镜像,可以直接拉滑块。noVNC 监听在 8080 端口。
## 环境变量
## 环境变量
...
@@ -61,6 +86,7 @@ ENV QQ_ID 11111111
...
@@ -61,6 +86,7 @@ ENV QQ_ID 11111111
ENV QQ_PASS qweqwe
ENV QQ_PASS qweqwe
ENV WS_PORT 6700
ENV WS_PORT 6700
ENV WS_TOKEN qweqwe
ENV WS_TOKEN qweqwe
ENV VNC_PASS nanahira
```
```
### 说明
### 说明
...
@@ -74,3 +100,5 @@ ENV WS_TOKEN qweqwe
...
@@ -74,3 +100,5 @@ ENV WS_TOKEN qweqwe
*
`WS_PORT`
Websocket 端口。
*
`WS_PORT`
Websocket 端口。
*
`WS_TOKEN`
Websocket 使用的密钥。
*
`WS_TOKEN`
Websocket 使用的密钥。
*
`VNC_PASS`
仅限
`novnc`
镜像。noVNC 网页密码,默认
`nanahira`
。
pm2-novnc.json
View file @
cd3e3b0d
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
},
},
{
{
"name"
:
"x11vnc"
,
"name"
:
"x11vnc"
,
"script"
:
"/usr/bin/x11vnc"
"script"
:
"bash"
,
"args"
:
" -c '/usr/bin/x11vnc -passwd ${VNC_PASS}'"
},
},
{
{
"name"
:
"novnc"
,
"name"
:
"novnc"
,
...
@@ -20,6 +21,10 @@
...
@@ -20,6 +21,10 @@
"script"
:
"socat"
,
"script"
:
"socat"
,
"args"
:
"tcp-listen:6000,reuseaddr,fork unix:/tmp/.X11-unix/X0"
"args"
:
"tcp-listen:6000,reuseaddr,fork unix:/tmp/.X11-unix/X0"
},
},
{
"name"
:
"fluxbox"
,
"script"
:
"fluxbox"
},
{
{
"name"
:
"mirai"
,
"name"
:
"mirai"
,
"script"
:
"java"
,
"script"
:
"java"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment