mbround18 / valheim-docker

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
https://hub.docker.com/r/mbround18/valheim
BSD 3-Clause "New" or "Revised" License
767 stars 82 forks source link

[Bug] Docker Container crashes on entrypoint.sh #170

Closed michaelgrosser closed 3 years ago

michaelgrosser commented 3 years ago

System Information

Operating System: Amazon Linux 2 Docker Version: 19.03.13-ce, build 4484c46 Docker Compose Version: 1.28.4, build cabd5cfb User & Group On Host: ec2-user/ec2-user 1000:1000 (non-root) Are you running with BepInEx? No

Issue Description

The Valheim server crashes on entrypoint.sh. The following is the entirety of the logfile from the Valheim container

valheim_1  | /entrypoint.sh: line 2: $'\r': command not found
valheim_1  | /entrypoint.sh: line 8: $'\r': command not found
valheim_1  | /entrypoint.sh: line 11: $'\r': command not found
valheim_1  | /entrypoint.sh: line 18: syntax error near unexpected token `$'{\r''
'alheim_1  | /entrypoint.sh: line 18: `log() {

This my Docker compose file:

version: "3"
services:
  valheim:
    image: mbround18/valheim:latest
    ports:
      - 2456:2456/udp
      - 2457:2457/udp
      - 2458:2458/udp
    environment:
      - PORT=2456
      - NAME="Created With Valheim Docker"
      - WORLD="[REDACTED]"
      - PASSWORD="[REDACTED]"
      - TZ="America/Chicago"
      - PUBLIC=1
      - AUTO_UPDATE=0
    volumes:
    - ./valheim/saves:/home/steam/.config/unity3d/IronGate/Valheim
    - ./valheim/server:/home/steam/valheim

I have tried creating the /saves and /server dirs as the ec2-user to rule out any issues with that.

mbround18 commented 3 years ago

What version of the container are you running?

michaelgrosser commented 3 years ago

Added note - this does not happen if you use the 1.2.0 image from your Dockerhub repo, but your getting started documentation has latest in the docker-compose example. It appears something is broken in the latest version of the image.

mbround18 commented 3 years ago

I see, I will take a gander one moment

mbround18 commented 3 years ago

new version of latest should be up in ~10 min.

mbround18 commented 3 years ago

@michaelgrosser good callout! Should be live now https://hub.docker.com/layers/135882245/mbround18/valheim/latest/images/sha256-8b0debd28b66dd8dd07b05ed0604fd0e75a0367227b9b868f61dd2347f843134?context=explore

michaelgrosser commented 3 years ago

@mbround18 Hey, thanks for the quick fix and for providing the repo in general. I was considering writing something myself, and you saved me a bunch of time!