Enviar arquivos para "/"
This commit is contained in:
@@ -40,4 +40,4 @@ RUN /install.sh
|
||||
|
||||
EXPOSE 6080 5555
|
||||
|
||||
CMD ["/start.sh"]
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
|
||||
43
start.sh
43
start.sh
@@ -1,13 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo ">>> Iniciando Xvfb 1920x1080..."
|
||||
Xvfb :0 -screen 0 1920x1080x24 &
|
||||
sleep 2
|
||||
|
||||
echo ">>> Iniciando Openbox..."
|
||||
DISPLAY=:0 openbox &
|
||||
sleep 1
|
||||
# Aguarda Xvfb estar pronto
|
||||
sleep 3
|
||||
|
||||
echo ">>> Iniciando Android TV via QEMU..."
|
||||
DISPLAY=:0 qemu-system-x86_64 \
|
||||
@@ -18,39 +13,11 @@ DISPLAY=:0 qemu-system-x86_64 \
|
||||
-drive file=/android/android.img,format=qcow2 \
|
||||
-boot c \
|
||||
-vga virtio \
|
||||
-display sdl \
|
||||
-display gtk \
|
||||
-net nic \
|
||||
-net user,hostfwd=tcp::5555-:5555 \
|
||||
-usb \
|
||||
-device usb-tablet \
|
||||
-soundhw hda \
|
||||
-full-screen &
|
||||
-full-screen
|
||||
|
||||
sleep 3
|
||||
|
||||
echo ">>> Iniciando x11vnc..."
|
||||
x11vnc \
|
||||
-display :0 \
|
||||
-forever \
|
||||
-shared \
|
||||
-nopw \
|
||||
-quiet \
|
||||
-o /var/log/x11vnc.log &
|
||||
|
||||
sleep 1
|
||||
|
||||
echo ">>> Iniciando noVNC na porta 6080..."
|
||||
websockify \
|
||||
--web /usr/share/novnc \
|
||||
--wrap-mode=ignore \
|
||||
6080 \
|
||||
localhost:5900 &
|
||||
|
||||
echo ">>> Android TV rodando!"
|
||||
echo ">>> Acesse: http://SEU_IP:6080/vnc_lite.html"
|
||||
|
||||
# ADB bridge para o guest
|
||||
socat TCP-LISTEN:5555,fork TCP:localhost:5555 &
|
||||
|
||||
# Mantém container vivo
|
||||
tail -f /dev/null
|
||||
echo ">>> QEMU encerrado."
|
||||
|
||||
46
supervisord.conf
Normal file
46
supervisord.conf
Normal file
@@ -0,0 +1,46 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[program:xvfb]
|
||||
command=/usr/bin/Xvfb :0 -screen 0 1920x1080x24
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
stdout_logfile=/var/log/supervisor/xvfb.log
|
||||
stderr_logfile=/var/log/supervisor/xvfb.log
|
||||
|
||||
[program:openbox]
|
||||
command=/usr/bin/openbox
|
||||
environment=DISPLAY=":0"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=20
|
||||
depends_on=xvfb
|
||||
stdout_logfile=/var/log/supervisor/openbox.log
|
||||
stderr_logfile=/var/log/supervisor/openbox.log
|
||||
|
||||
[program:x11vnc]
|
||||
command=/usr/bin/x11vnc -display :0 -forever -shared -nopw -quiet
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=30
|
||||
stdout_logfile=/var/log/supervisor/x11vnc.log
|
||||
stderr_logfile=/var/log/supervisor/x11vnc.log
|
||||
|
||||
[program:novnc]
|
||||
command=/usr/bin/websockify --web /usr/share/novnc --wrap-mode=ignore 6080 localhost:5900
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=40
|
||||
stdout_logfile=/var/log/supervisor/novnc.log
|
||||
stderr_logfile=/var/log/supervisor/novnc.log
|
||||
|
||||
[program:android]
|
||||
command=/start.sh
|
||||
autostart=true
|
||||
autorestart=false
|
||||
priority=50
|
||||
stdout_logfile=/var/log/supervisor/android.log
|
||||
stderr_logfile=/var/log/supervisor/android.log
|
||||
Reference in New Issue
Block a user