From 2dd674a98fca76352e14ce1aeacdeb567281b05a Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Mon, 23 Apr 2018 22:20:00 +0000 Subject: [PATCH] Update dockerfile Update dockerfile to be more useful Add support for newer hlds --- Dockerfile | 12 ++++++++++-- Makefile | 11 ++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d15d8a..684f2b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,10 +47,18 @@ RUN touch /home/steam/hlds/ns/server.cfg COPY entry.sh /home/steam/hlds +USER root +RUN apt-get update && apt-get install -y libcurl3 libcurl3:i386 gcc-multilib g++-multilib +USER steam + +WORKDIR /home/steam/hlds +RUN wget https://github.com/ENSL/ensl-plugin/releases/download/v1.3/ensl_srvpkg-v1.3.zip -O srv.zip +RUN unzip srv.zip + # VAC, HLDS, RCON, HLTV EXPOSE 26900 -EXPOSE 27015/udp -EXPOSE 27015 +EXPOSE 27016/udp +EXPOSE 27016 EXPOSE 27020 ENTRYPOINT ["./entry.sh"] diff --git a/Makefile b/Makefile index 1576e15..1db944d 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ REGISTRY ?= ensl PROJECT ?= ensl_hlds TAG ?= latest -.PHONY: all clean build +.PHONY: all clean build stop ifdef REGISTRY IMAGE=$(REGISTRY)/$(PROJECT):$(TAG) @@ -23,10 +23,15 @@ build: Dockerfile run: build mkdir -p logs #docker run -p 27015:27015 27015/udp:27015/udp -v $(shell pwd)/logs:/home/steam/hlds/ns/logs -ti $(IMAGE) - docker run --net=host -v $(shell pwd)/logs:/home/steam/hlds/ns/logs -ti $(IMAGE) + docker run --name=$(PROJECT) --net=host -v $(shell pwd)/logs:/home/steam/hlds/ns/logs -ti $(IMAGE) + +stop: + docker stop $(PROJECT) + docker rm $(PROJECT) shell: - docker exec -u0 -ti $(IMAGE) -v /bin/bash + docker run --name=$(PROJECT) --net=host -v $(shell pwd)/logs:/home/steam/hlds/ns/logs -u0 -ti $(IMAGE) /bin/bash +# docker exec -u0 -ti $(IMAGE) -v /bin/bash pull: docker pull $(IMAGE) || true