Initial commit

This commit is contained in:
Igor Yamolov 2018-03-06 03:06:42 +01:00
commit d5fb5e2a31
7 changed files with 90 additions and 0 deletions

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM debian:stretch-slim
### Install Dependencies (Mono, unzip, ...)
### TODO: Move to base image
ADD install_deps.sh /
RUN /install_deps.sh
### Basic settings for Eco Server
WORKDIR /srv/eco-server
EXPOSE 2999/udp 3000 3001
VOLUME ["/srv/eco-server/Storage", "/srv/eco-server/Configs"]
CMD ["mono", "EcoServer.exe", "-no-gui"]
ARG ECO_FILENAME
LABEL eco.version="unknown"
ADD ${ECO_SERVER_FILENAME} /tmp
### Install Eco Server
ADD install.sh ./
RUN /srv/eco-server/install.sh ${ECO_FILENAME}

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
ECO_VERSION ?= 0.7.1.2-beta
ECO_FILENAME = EcoServer_v${ECO_VERSION}.zip
ECO_SERVER_URL = https://s3-us-west-2.amazonaws.com/eco-releases/EcoServer_v${ECO_VERSION}.zip
DOCKER_IMAGE = t3hk0d3/eco-server
DOCKER_TARGET = ${DOCKER_IMAGE}:${ECO_VERSION}
all: build push clean
download:
if [ ! -f ${ECO_FILENAME} ]; then \
curl -o "${ECO_FILENAME}" "${ECO_SERVER_URL}"; \
fi;
verify: download
shasum -a 256 -c SHA256SUMS
build: verify
docker build --rm \
--label "eco.version=${ECO_VERSION}" \
--build-arg ECO_FILENAME="${ECO_FILENAME}" \
-t ${DOCKER_TARGET} .
push:
docker push ${DOCKER_TARGET}
clean:
rm -rf "${ECO_FILENAME}"

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Eco Game Server Docker Image
## How to use
```
mkdir -p ~/eco-server/Storage ~/eco-server/Configs
docker run -v ~/eco-server/Storage:/srv/eco-server/Storage -v ~/eco-server/Configs:/srv/eco-server/Configs --network="host" t3hk0d3/eco-server:0.7.1.2-beta
```
## How to build
```
make build
```

1
SHA256SUMS Normal file
View File

@ -0,0 +1 @@
61270db3e806e08e00d08a0c00eed78941e7a62a50e14529faaa5754005c3ece *EcoServer_v0.7.1.2-beta.zip

1
checksum Normal file
View File

@ -0,0 +1 @@
62270db3e806e08e00d08a0c00eed78941e7a62a50e14529faaa5754005c3ece *EcoServer_v0.7.1.2-beta.zip

9
install.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
ECO_FILENAME=$1
unzip /tmp/${ECO_FILENAME} -d /srv/eco-server/ || exit 1
rm -rf /tmp/*
exit 0

12
install_deps.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian beta-stretch main" > /etc/apt/sources.list.d/mono-official-beta.list
apt-get update -qq -y || exit 1
apt-get -y --allow-unauthenticated install unzip mono-complete wget || exit 1
rm -rf /var/lib/apt/lists/* /tmp/*
exit 0