From aa0988a2595b473ba8c63808e5b790852c1c6edb Mon Sep 17 00:00:00 2001 From: Mar Alegre Date: Wed, 3 Mar 2021 18:37:23 -0500 Subject: [PATCH] started working on valheim container --- valheim/Containerfile | 36 ++++++++++++++++++++++++++++++++++++ valheim/startup/valheim | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 valheim/Containerfile create mode 100755 valheim/startup/valheim diff --git a/valheim/Containerfile b/valheim/Containerfile new file mode 100644 index 0000000..9145e6f --- /dev/null +++ b/valheim/Containerfile @@ -0,0 +1,36 @@ +### +### Build Variables +### +FROM localhost/debian:latest + +# deploy options +# -p (port) and -v (volume) both go host:container +LABEL config_default="\ +-p 2456-2458:2456-2458 \ +-p 2456-2458:2456-2458/udp \ +-v /srv/vol/valheim/data:/vol/data" + +# Build variables +# uid that the files owner user should have +ARG FILESUID=5000 + +### +### General Setup +### + +# install packages we want +RUN apt update -y && apt install -y git net-tools + +# create valheim server user with file owner UID +RUN addgroup --gid $FILESUID vhadmin && \ + adduser vhadmin --ingroup vhadmin --uid $FILESUID --disabled-password --gecos "Valheim Server Admin" --shell /usr/sbin/nologin && \ + rm /home/mcadmin/.bashrc + +# Copy custom scripts +COPY assets/bin/ /usr/local/bin/ + +### +### Valheim +### +WORKDIR /home/vhadmin + diff --git a/valheim/startup/valheim b/valheim/startup/valheim new file mode 100755 index 0000000..962e1c6 --- /dev/null +++ b/valheim/startup/valheim @@ -0,0 +1,2 @@ +#!/bin/bash +podman start valheim