TuRz4m / Ark-docker

Docker for ARK: Survival Evolved
167 stars 184 forks source link

problems in setup #11

Closed KasperFranz closed 8 years ago

KasperFranz commented 8 years ago

Hey

I have now tried to use your image to setup a ark server without any luck. (this is my first try with docker)

When trying to start the docker image ( docker run -it -p 7779:7778 -p 7779:7778/udp -p 27016:27015 -p 27016:27015/udp -p 32331:32330 -e SESSIONNAME="Ark" -e ADMINPASSWORD="somerandompassword" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -v ~/docker-ark:/ark:Z --name ark turzam/ark

i get the following output

Ark Server - Wed Jul 6 13:53:00 UTC 2016

[Error] Can't access ark directory. Check permissions on your mapped directory with /ark

What am i doing wrong? what am i missing?

KasperFranz commented 8 years ago

the ark directory is created in the setup process

KasperFranz commented 8 years ago

I think my issue is that the default user on the docker is 1000 and my docker user is 1003.

Do you know how to set this without having to do -u=1000 and -user=1000 on every run?

Julime commented 8 years ago

you need to have the right user:group permissions to yout folder:

julime@mymachine:/srv/docker$ ls -la
drwxr-xr-x  6 julime julime 4096 Jul  6 22:30 ark/

you can set these with chmod -R julime:julime ark/

KasperFranz commented 8 years ago

Julime, that doesn't solve the problem as the problem is something between the volumen on the container and my local, where permissions doesn't match up if i don't do the -u=100 etc.

TuRz4m commented 8 years ago

I'm working on something for you, it willl be ready soon on the 1.3-dev branch. :)

TuRz4m commented 8 years ago

You can try now with the following docker-compose.yml :

ark: container_name: ark image: turzam/ark:1.3-dev environment:

  • SESSIONNAME=Ark
  • SERVERMAP=TheIsland
  • STEAMPORT=7779
  • SERVERPORT=27016
  • SERVERPASSWORD=""
  • ADMINPASSWORD=somerandompassword
  • BACKUPONSTART=1
  • UPDATEONSTART=1
  • TZ=Europe/Paris
  • GID=1003
  • UID=1003
    volumes:
  • ~/docker-ark:/ark
    ports:
    • 7779:7779/udp
    • 7779:7779
    • 27016:27016/udp
    • 27016:27016
    • 32331:32330

And run it with the command docker-compose up -d

Note : You can't just rebind the port 7778 & 27015, you need to use the environment variable SERVERPORT and STEAMPORT (or it won't work). Note 2 : You can see here the doc for this version (1.3-dev).

KasperFranz commented 8 years ago

I will try it out - thank you :)

KasperFranz commented 8 years ago

That didn't work sadly.

My fix was to add user 1000 to sudoer and make that account own the folder in /home/docker/docker-ark (the location of ~/docker-ark)

I don't like the solution as user 1000 is minecraft which for security reasons wasn't in sudoers.

But I guess this is more of a general docker problem and not a problem with your docker image

TuRz4m commented 8 years ago

Ok, my bad : the build failed on docker hub because it couldn't contact steam... -_- It should be good now. Edit : don't forget to git pull turzam/ark:1.3-dev to get the latest version.

KasperFranz commented 8 years ago

That got it to work, I got it to work now with your updated version.

Thank you so much for all this :)

TuRz4m commented 8 years ago

You're welcome :]