Dockerization WIP

This commit is contained in:
root 2023-05-31 13:58:27 +00:00
parent c67161b395
commit a037301b2e
89 changed files with 22 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
*
!KFGame/Config/

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM cm2network/steamcmd:latest as builder
WORKDIR /home/steam/kf2server
RUN /home/steam/steamcmd/steamcmd.sh +force_install_dir /home/steam/kf2server +login anonymous +app_update 232130 +quit
FROM ubuntu:22.04 as production
RUN adduser --system kf2server && apt update && apt upgrade --yes && apt install --yes --no-install-recommends ca-certificates libcurl4 && apt clean && mkdir -p /home/kf2server/KFGame/Cache
WORKDIR /home/kf2server
USER kf2server
COPY --from=builder --chown=root:root /home/steam/kf2server .
CMD ["/home/kf2server/Binaries/Win64/KFGameSteamServer.bin.x86_64"]

12
docker-compose.yml Normal file
View File

@ -0,0 +1,12 @@
version: "2.1"
services:
kf2server1:
build: .
image: kf2server
container_name: kf2server1
volumes:
- ./configs/server1:/home/kf2server/KFGame/Config
ports:
- "7777:7777/udp"
- "27015:27015/udp"
- "8080:8080"