From dbb741b6c1a6999f41d85c4bec9a171a837728e1 Mon Sep 17 00:00:00 2001 From: Kostas Subdee Date: Thu, 1 Mar 2018 15:03:32 +0100 Subject: [PATCH 1/2] Make manager.io dispensable so it can get latest version when container is started --- Dockerfile | 20 +++++--------------- init.sh | 11 +++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100755 init.sh diff --git a/Dockerfile b/Dockerfile index ed8c3ab..5b04905 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,11 @@ -FROM mono:4.6 -MAINTAINER Maksym Prokopov -#RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF -#RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list -#RUN apt-get update -qq && apt-get -yf install mono-complete wget -RUN mkdir /manager /data -WORKDIR /manager +FROM mono:5.8 -ADD libe_sqlite3.so . -#this is manually compiled libe_sqlite3 version -#to clear curl cache bump version -ENV MANAGER_VER 16.12.56 +COPY init.sh / -RUN curl -O https://mngr.s3.amazonaws.com/ManagerServer.tar.gz \ - && tar -xzf ManagerServer.tar.gz \ - && rm ManagerServer.tar.gz -CMD mono ManagerServer.exe -port 8080 -path "/data" +RUN mkdir /manager /data +WORKDIR /manager VOLUME ["/data"] EXPOSE 8080 +ENTRYPOINT ["/init.sh"] \ No newline at end of file diff --git a/init.sh b/init.sh new file mode 100755 index 0000000..73659de --- /dev/null +++ b/init.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +LATEST_VERSION=`curl https://www.manager.io/version.txt` + +curl -O https://d2ap5zrlkavzl7.cloudfront.net/$LATEST_VERSION/ManagerServer.tar.gz + +tar -xzf ManagerServer.tar.gz + +rm -f ManagerServer.tar.gz + +mono ManagerServer.exe -port 8080 -path "/data" \ No newline at end of file From 0764155e550091ed7668eb0c0226314771a48d13 Mon Sep 17 00:00:00 2001 From: Kostas Thermos Date: Fri, 31 Jan 2020 08:28:24 +0200 Subject: [PATCH 2/2] Update process of downloading server --- Dockerfile | 4 +++- init.sh | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b04905..1b90ef4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM mono:5.8 +FROM mono:6.8 + +RUN apt-get update && apt-get install wget unzip COPY init.sh / diff --git a/init.sh b/init.sh index 73659de..d2e34f6 100755 --- a/init.sh +++ b/init.sh @@ -1,11 +1,9 @@ #!/bin/bash -LATEST_VERSION=`curl https://www.manager.io/version.txt` +wget https://github.com/Manager-io/Manager.zip/releases/latest/download/Manager.zip -O Manager.zip -curl -O https://d2ap5zrlkavzl7.cloudfront.net/$LATEST_VERSION/ManagerServer.tar.gz +unzip Manager.zip -tar -xzf ManagerServer.tar.gz - -rm -f ManagerServer.tar.gz +rm -f Manager.zip mono ManagerServer.exe -port 8080 -path "/data" \ No newline at end of file