Update dockerfile

Update dockerfile to be more useful
Add support for newer hlds
This commit is contained in:
Ari Timonen 2018-04-23 22:20:00 +00:00
parent a7914845b3
commit 2dd674a98f
2 changed files with 18 additions and 5 deletions

View file

@ -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"]

View file

@ -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