mirror of
https://github.com/ENSL/ensl_hlds.git
synced 2025-03-03 15:41:06 +00:00
Update dockerfile
Update dockerfile to be more useful Add support for newer hlds
This commit is contained in:
parent
a7914845b3
commit
2dd674a98f
2 changed files with 18 additions and 5 deletions
12
Dockerfile
12
Dockerfile
|
@ -47,10 +47,18 @@ RUN touch /home/steam/hlds/ns/server.cfg
|
||||||
|
|
||||||
COPY entry.sh /home/steam/hlds
|
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
|
# VAC, HLDS, RCON, HLTV
|
||||||
EXPOSE 26900
|
EXPOSE 26900
|
||||||
EXPOSE 27015/udp
|
EXPOSE 27016/udp
|
||||||
EXPOSE 27015
|
EXPOSE 27016
|
||||||
EXPOSE 27020
|
EXPOSE 27020
|
||||||
|
|
||||||
ENTRYPOINT ["./entry.sh"]
|
ENTRYPOINT ["./entry.sh"]
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -2,7 +2,7 @@ REGISTRY ?= ensl
|
||||||
PROJECT ?= ensl_hlds
|
PROJECT ?= ensl_hlds
|
||||||
TAG ?= latest
|
TAG ?= latest
|
||||||
|
|
||||||
.PHONY: all clean build
|
.PHONY: all clean build stop
|
||||||
|
|
||||||
ifdef REGISTRY
|
ifdef REGISTRY
|
||||||
IMAGE=$(REGISTRY)/$(PROJECT):$(TAG)
|
IMAGE=$(REGISTRY)/$(PROJECT):$(TAG)
|
||||||
|
@ -23,10 +23,15 @@ build: Dockerfile
|
||||||
run: build
|
run: build
|
||||||
mkdir -p logs
|
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 -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:
|
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:
|
pull:
|
||||||
docker pull $(IMAGE) || true
|
docker pull $(IMAGE) || true
|
||||||
|
|
Loading…
Reference in a new issue