Skip to content

Commit

Permalink
docker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bloke committed May 1, 2018
1 parent 2eebc8c commit 1694081
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM debian:stretch-slim

## VARIABLES
ENV MAX_PLAYERS=22
ENV MAIN_SHARED=
ENV FS_GAME=
ENV CONFIG=
ENV ARGS=

RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y lib32stdc++6

COPY bin/ cod4x-server
RUN chmod +x cod4x-server/cod4x18_dedrun
RUN groupadd -r cod && useradd --no-log-init -r -g cod cod

RUN chown -R cod:cod cod4x-server

RUN mkdir cod4x-server/main
RUN chown -R cod:cod cod4x-server/main

VOLUME /cod4x-server-base/main /cod4x-server-base/zone /cod4x-server/plugins /cod4x-server/mods
EXPOSE 28960
USER cod

ENTRYPOINT cd cod4x-server && ./cod4x18_dedrun +set net_port 28960 +map mp_killhouse +set sv_maxclients $MAX_PLAYERS +set fs_homepath . +set fs_basepath ../cod4x-server-base +set fs_game "$FS_GAME" +exec "$CONFIG" $ARGS
#ENTRYPOINT /bin/bash
3 changes: 2 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,5 @@ clean_all:
@echo clean Tomcrypt
@$(MAKE) -C $(SRC_DIR)/tomcrypt clean


docker: $(TARGET)
@docker build . -t cod4x/bleeding

0 comments on commit 1694081

Please sign in to comment.