Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem Overwrites/Not Copying For Valheim Plus #150

Closed
nickkeane opened this issue Feb 20, 2021 · 10 comments · Fixed by #148
Closed

Filesystem Overwrites/Not Copying For Valheim Plus #150

nickkeane opened this issue Feb 20, 2021 · 10 comments · Fixed by #148

Comments

@nickkeane
Copy link

I'm trying to create a custom image to bootstrap ValheimPlus, in anticipation of #148. The Dockerfile looks like this:

FROM busybox:latest as ValheimPlus

ENV VPLUS_VERSION "0.8"

WORKDIR /opt/valheim-plus

RUN wget https://github.com/nxPublic/ValheimPlus/releases/download/$VPLUS_VERSION/UnixServer.zip \
&& unzip UnixServer.zip \
&& rm UnixServer.zip

FROM mbround18/valheim:latest AS Valheim

RUN mkdir /opt/valheimplus
RUN mkdir /home/steam/valheim

COPY --from=ValheimPlus --chmod=755 /opt/valheim-plus /opt/valheimplus/ # this works, files show up
COPY --from=ValheimPlus --chmod=755 /opt/valheim-plus /home/steam/valheim/ # this doesn't...

Presumably, Odin is overwriting/recreating/doing something weird with the file system there and it's removing my copied files somehow when i start the server, b/c the files i just copied over don't exist in /home/steam/valheim/ as i expect them to when i check the folder in the container. Is Odin deleting and recreating /home/steam/valheim/ whole-cloth?

Is there a way to fix this so i can automate deploying V+? Or another automated method?
I know the quick and dirty solution is to extract the zip manually after filesystem creation, but I like automagic things :3.

@mbround18
Copy link
Owner

Its in the start valheim script, I can add a flag for it

@mbround18
Copy link
Owner

mbround18 commented Feb 20, 2021

Btw @nickkeane if you want to test out the bepinex feature early, switch your image to ghcr.io/mbround18/valheim:development-bepinex it should be accessible via github but I am not sure.

@mbround18
Copy link
Owner

It has the switch for force installation
image

@nickkeane
Copy link
Author

I'm getting an unauthorized error when referencing the image, not sure if I'm doing it right:

Step 5/8 : FROM ghcr.io/mbround18/valheim:development-bepinex AS Valheim
ERROR: Service 'valheim' failed to build : Head https://ghcr.io/v2/mbround18/valheim/manifests/development-bepinex: unauthorized

@mbround18
Copy link
Owner

Huh it should be open permissions on that archive, let me try to push to dockerhub

@mbround18
Copy link
Owner

mbround18 commented Feb 20, 2021

Sweeet looks like someone stopped trying to gain access to my dockerhub,

try just mbround18/valheim:development-bepinex which should pull from dockerhub

https://hub.docker.com/layers/138364213/mbround18/valheim/development-bepinex/images/sha256-2e57c0911cbb56fede53e693cc3c1933caea388740911afb742f6e030a307644?context=explore

@nickkeane
Copy link
Author

When starting the dev image I get this error, the stable image seems to bootstrap steamcmd fine:

valheim | [Valheim][steam]: Running Install...
valheim | [ODIN][INFO] - Installing 896660 to /home/steam/valheim
valheim | [ODIN][ERROR] - Failed to find steamcmd in path
valheim | [ODIN][ERROR] - Checking for script under steam user.
valheim | [ODIN][INFO] - Executing: /home/steam/steamcmd/steamcmd.sh .....
valheim | [ODIN][INFO] - Using steamcmd script at /home/steam/steamcmd/steamcmd.sh
valheim | WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
valheim | Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
valheim | [ 0%] Checking for available updates...
valheim | KeyValues Error: LoadFromBuffer: missing { (current key: '<!DOCTYPE') in file manifest [offset: 14]
valheim |
valheim | /data/src/tier1/KeyValues.cpp (2999) : Assertion Failed: Error while parsing text KeyValues for resource manifest
valheim | [----] Verifying installation...
valheim | [ 0%] Downloading update...
valheim | [ 0%] Checking for available updates...
valheim | KeyValues Error: LoadFromBuffer: missing { (current key: '<!DOCTYPE') in file manifest [offset: 14]
valheim |
valheim | /data/src/tier1/KeyValues.cpp (2999) : Assertion Failed: Error while parsing text KeyValues for resource manifest
valheim | [----] !!! Fatal Error: Steamcmd needs to be online to update. Please confirm your network connection and try again.
valheim | /data/src/tier0/threadtools.cpp (3658) : Assertion Failed: Illegal termination of worker thread 'Thread(0x0x5768cd70/0x0xf7bb2b'
valheim | [ODIN][INFO] - Exited with status code: 254
valheim | [Valheim][steam]: Initializing Variables....
valheim | [ODIN][ERROR] - Failed to find server executable! Please run odin install

@mbround18
Copy link
Owner

Do you have any weird networking preventing the container from reaching outside? Try running docker-compose down and then docker-compose up

@nickkeane
Copy link
Author

nickkeane commented Feb 20, 2021

No it works perfectly fine with the other image (mbround18/valheim:latest). And the error is pretty consistent, so it's probably noot some one-off thing w/ the steam servers. Was something changed with steamcmd or the file system in the dev branch?

My compose looks like this, the only thing I'm changing is the image.

version: "3.8"
services:
valheim:
image: mbround18/valheim:latest
container_name: valheim
restart: always
network_mode: bridge
ulimits:
nofile:
soft: 2048
hard: 2048
environment:
- PORT=2456
- NAME="[SDG] Valhalla Awaits"
- WORLD="valhalla_awaits"
- PASSWORD="sdg1234"
- PUID=1000
- PGID=60
- TZ=America/New_York
- PUBLIC=1
- FORCE_INSTALL=0
- AUTO_UPDATE=1
- AUTO_UPDATE_SCHEDULE="0 6 * * *"
- AUTO_BACKUP=1
- AUTO_BACKUP_SCHEDULE="0 * * * *"
- AUTO_BACKUP_REMOVE_OLD=1
- AUTO_BACKUP_DAYS_TO_LIVE=7
- AUTO_BACKUP_ON_UPDATE=1
- AUTO_BACKUP_ON_SHUTDOWN=1
- ODIN_CONFIG_FILE="config.json"
- VPLUS_VERSION="0.8"
ports:
- "2456:2456/udp"
- "2457:2457/udp"
- "2458:2458/udp"
volumes:
- ./app/server:/home/steam/valheim
- ./app/data:/home/steam/.config/unity3d/IronGate/Valheim
- ./app/backups:/home/steam/backups

@mbround18
Copy link
Owner

Nada nothing was changed in comparison to the steamcmd but i did do some work on the dev branch. Take a look at #149 for the changes that are occuring. Thats also where a few peeps are doing testing as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants