From 333b8de0326ddb21ba7644e8bf3db790cfd9e5c2 Mon Sep 17 00:00:00 2001 From: norimicry Date: Sat, 23 Jan 2021 18:10:21 +0100 Subject: [PATCH] jlsage --- config | 0 configs/autoload.json | 4 ++-- docker-compose.yml | 7 +++++-- docker/Dockerfile | 32 +++++++++++++++++++++++++------- docker/docker-entrypoint.sh | 26 +++++++++++++------------- 5 files changed, 45 insertions(+), 24 deletions(-) mode change 100644 => 100755 config diff --git a/config b/config old mode 100644 new mode 100755 diff --git a/configs/autoload.json b/configs/autoload.json index 24a30b7..c73ad9f 100755 --- a/configs/autoload.json +++ b/configs/autoload.json @@ -1,5 +1,5 @@ { - "LastFileLoaded": null, + "LastFileLoaded": "Bar_271098218", "LoadIntoMultiplayer": true, "ForgetLastFileOnTitle": true -} +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8c10e60..cafc3de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,12 @@ services: build: docker container_name: stardew environment: - - VNCPASS=nyanyanya + - "VNC_PASSWORD=2342" + - "DISPLAY_HEIGHT=1000" + - "DISPLAY_WIDTH=1000" ports: - - 5900:5900 + - 5902:5900 + - 5801:5800 - 24642:24642/udp volumes: - ./config:/root/.config/i3/config diff --git a/docker/Dockerfile b/docker/Dockerfile index e2d66a4..e9d376e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,15 +1,33 @@ -FROM mono:latest +# Pull base image. +FROM jlesage/baseimage-gui:debian-10 + +# Install xterm. +#RUN add-pkg xterm + +# Copy the start script. +#COPY startapp.sh /startapp.sh + +# Set the name of the application. +ENV APP_NAME="StardewValley" + + + +#FROM mono:latest RUN apt-get update -RUN apt-get install -y wget unzip xvfb x11vnc xterm i3 +#RUN apt-get install -y wget unzip xvfb x11vnc xterm i3 +RUN apt-get install -y wget unzip tar # Game + ModLoader 1.5.4 3.8.3 RUN mkdir -p /data/Stardew && \ mkdir -p /data/nexus && \ wget https://eris.cc/Stardew_latest.tar.gz -qO /data/latest.tar.gz && \ tar xf /data/latest.tar.gz -C /data/Stardew && \ - rm /data/latest.tar.gz && \ - wget https://github.com/Pathoschild/SMAPI/releases/download/3.8.3/SMAPI-3.8.3-installer.zip -qO /data/nexus.zip && \ + rm /data/latest.tar.gz + +RUN apt-get install -y mono-complete + +RUN wget https://github.com/Pathoschild/SMAPI/releases/download/3.8.3/SMAPI-3.8.3-installer.zip -qO /data/nexus.zip && \ unzip /data/nexus.zip -d /data/nexus/ && \ /bin/bash -c "echo -e \"2\n/data/Stardew/Stardew\ Valley\n1\n\" | /usr/bin/mono /data/nexus/SMAPI\ 3.8.3\ installer/internal/unix-install.exe" @@ -22,7 +40,7 @@ RUN unzip /data/alwayson.zip -d /data/Stardew/Stardew\ Valley/Mods && \ unzip /data/unlimitedplayers.zip -d /data/Stardew/Stardew\ Valley/Mods && \ unzip /data/autoloadgame.zip -d /data/Stardew/Stardew\ Valley/Mods && \ rm /data/alwayson.zip /data/unlimitedplayers.zip /data/autoloadgame.zip -RUN chmod +x /data/Stardew/Stardew\ Valley/StardewValley +RUN chmod +x /data/Stardew/Stardew\ Valley/StardewValley && \ + chmod -R 777 /data/Stardew/ -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /startapp.sh diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index d954b04..d9e07a9 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,17 +1,17 @@ -#!/bin/bash +#!/bin/sh -if [ -f /tmp/.X10-lock ]; then rm /tmp/.X10-lock; fi -Xvfb :10 -screen 0 1580x920x24 -ac & +#if [ -f /tmp/.X10-lock ]; then rm /tmp/.X10-lock; fi +#Xvfb :10 -screen 0 1580x920x24 -ac & -while [ ! -z "`xdpyinfo -display :10 2>&1 | grep 'unable to open display'`" ]; do - echo Waiting for display; - sleep 5; -done +#while [ ! -z "`xdpyinfo -display :10 2>&1 | grep 'unable to open display'`" ]; do +# echo Waiting for display; +# sleep 5; +#done -export DISPLAY=:10.0 -x11vnc -display :10 -rfbport 5900 -rfbportv6 -1 -no6 -noipv6 -httpportv6 -1 -forever -desktop StardewValley -cursor arrow -passwd $VNCPASS -shared & -sleep 5 -i3 & -export XAUTHORITY=~/.Xauthority -TERM=xterm +#export DISPLAY=:10.0 +#x11vnc -display :10 -rfbport 5900 -rfbportv6 -1 -no6 -noipv6 -httpportv6 -1 -forever -desktop StardewValley -cursor arrow -passwd $VNCPASS -shared & +#sleep 5 +#i3 & +#export XAUTHORITY=~/.Xauthority +#TERM=xterm /data/Stardew/Stardew\ Valley/StardewValley