Docker build for managing an ARK: Survival Evolved server. Using Ark-Server-Tools
1.4K
Note: The original repo was designed to run ark in a docker container but it was failing.
I rewrote the docker image and updated it to run in Kubernetes. There are some concepts barrowed from TuRz4m/Ark-docker but
this is completely rewritten with a new directory strucutre.
Original repo: https://github.com/TuRz4m/Ark-docker
Docker build for managing an ARK: Survival Evolved server.
This image uses Ark Server Tools to manage an ark server.
Docker stop is a clean stopFast & Easy server setup :
docker run -d -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -e SESSION_NAME=myserver -e ADMIN_PASSWORD="mypasswordadmin" --name ark-server neffets/ark-server:1.0`
You can map the ark volume to access config files :
docker run -d -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -e SESSION_NAME=myserver -v /my/path/to/ark:/ark --name ark-server neffets/ark-server:1.0
Then you can edit /my/path/to/ark/config/arkmanager.cfg (the values override GameUserSetting.ini) and /my/path/to/ark/config/[GameUserSetting.ini/Game.ini]
You can manager your server with rcon if you map the rcon port (you can rebind the rcon port with docker):
docker run -d -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -p 32330:32330 -e SESSION_NAME=myserver --name ark-server neffets/ark-server:1.0`
You can change server and steam port to allow multiple servers on same host:
(You can't just rebind the port with docker. It won't work, you need to change STEAM_PORT & SERVER_PORT variable)
docker run -d -p 7779:7779 -p 7779:7779/udp -p 27016:27016 -p 27016:27016/udp -p 32331:32330 -e SESSION_NAME=myserver2 -e SERVER_PORT=27016 -e STEAM_PORT=7779 --name ark2-server neffets/ark-server:1.0
You can check your server with :
docker exec ark arkmanager status
You can manually update your mods:
docker exec ark arkmanager update --update-mods
You can manually update your server:
docker exec ark arkmanager update --force
You can force save your server :
docker exec ark arkmanager saveworld
You can backup your server :
docker exec ark arkmanager backup
You can upgrade Ark Server Tools :
docker exec ark arkmanager upgrade-tools
You can use rcon command via docker :
docker exec ark arkmanager rconcmd ListPlayers
Full list of available command here
You can check all available command for arkmanager here
You can easily configure automatic update and backup.
If you edit the file /my/path/to/ark/crontab you can add your crontab job.
For example :
# Update the server every hours
0 * * * * arkmanager update --warn --update-mods >> ${DATA_DIR}/log/crontab.log 2>&1
# Backup the server each day at 00:00
0 0 * * * arkmanager backup >> ${DATA_DIR}/log/crontab.log 2>&1
You can check this website for more information on cron.
To add mods, you only need to change the variable ark_GameModIds in arkmanager.cfg with a list of your modIds (like this ark_GameModIds="987654321,1234568"). If UPDATE_ON_START is enable, just restart your docker or use docker exec ark arkmanager update --update-mods.
docker run -it -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -p 32330:32330 -e SESSION_NAME=myserver -e ADMIN_PASSWORD="mypasswordadmin" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -v /my/path/to/ark:/ark --name ark-server neffets/ark-server:1.00 0 * * * arkmanager update --warn --update-mods >> ${DATA_DIR}/log/crontab.log 2>&10 0 * * * arkmanager backup >> ${DATA_DIR}/log/crontab.log 2>&1docker start arkdocker exec ark arkmanager statustzselect. For example, France is "Europe/Paris").---
apiVersion: v1
kind: Namespace
metadata:
name: ark-server
labels:
name: ark-server
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ark-server-pv-claim
namespace: ark-server
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20G
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ark-server
name: ark-server
labels:
app: ark-server
spec:
replicas: 1
selector:
matchLabels:
app: ark-server
template:
metadata:
labels:
app: ark-server
spec:
containers:
- name: ark-server
imagePullPolicy: Always
image: neffets/ark-server:1.6
ports:
- name: steam
containerPort: 7778
- name: join
containerPort: 27015
volumeMounts:
- name: ark-server-persistent-storage
mountPath: /ark
volumes:
- name: ark-server-persistent-storage
persistentVolumeClaim:
claimName: ark-server-pv-claim
---
apiVersion: v1
kind: Service
metadata:
name: ark-server-service
namespace: ark-server
labels:
name: ark-server
spec:
externalIPs:
- xx.xx.xx.xx
ports:
- port: 7778
name: steam-tcp
targetPort: 7778
protocol: TCP
- port: 7778
name: steam-udp
targetPort: 7778
protocol: UDP
- port: 27015
name: game-tcp
targetPort: 27015
protocol: TCP
- port: 27015
name: game-udp
targetPort: 27015
protocol: UDP
selector:
app: ark-server
last: 2021-04-05
Content type
Image
Digest
Size
250.6 MB
Last updated
over 5 years ago
docker pull neffets/ark-server