From 77f7b813f79b644a8380e0d58750dfc4e271facc Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 18 Apr 2017 14:31:05 +0300 Subject: [PATCH 1/9] Fixed installation ttf-mscorefonts-installer --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 73a7e32..d9f7bef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ apt-get -y update && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ - apt-get --force-yes -yq install software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ + apt-get --force-yes -yq install update-notifier-common=0.154.1 software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \ sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \ sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" && \ From 61a56eb31eb8eb20631e917bdfd04a18cac35961 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 25 Apr 2017 16:09:38 +0300 Subject: [PATCH 2/9] Removed unused code --- run-document-server.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/run-document-server.sh b/run-document-server.sh index 3f42949..4722457 100644 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -70,7 +70,6 @@ parse_rabbitmq_url(){ else user=$userpass fi - echo $user # extract the host local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)" From 8ae9329c8eb112e68d8580150fb8c564cc4aa4d3 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Wed, 26 Apr 2017 19:03:42 +0300 Subject: [PATCH 3/9] Added pwgen --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ca936b2..064d76c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ apt-get -y update && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ - apt-get --force-yes -yq install update-notifier-common=0.154.1 software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ + apt-get --force-yes -yq install update-notifier-common=0.154.1 software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor pwgen fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \ sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \ sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" && \ From 9f1048c9f75702c182ecb3dd8d491dcb18bb5b35 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Wed, 17 May 2017 17:43:24 +0300 Subject: [PATCH 4/9] Setup default params for make --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 7a51308..290c1a5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +COMPANY_NAME ?= onlyoffice +GIT_BRANCH ?= develop +PRODUCT_NAME ?= documentserver-integration +PRODUCT_VERSION ?= 0.0.0 +BUILD_NUMBER ?= 0 + PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) REPO_URL := "deb http://repo-doc-onlyoffice-com.s3.amazonaws.com/ubuntu/trusty/$(COMPANY_NAME)-$(PRODUCT_NAME)/$(GIT_BRANCH)/$(PACKAGE_VERSION)/ repo/" From af131c3007bb78ec2feb1cdf78d48d69fa6a1e70 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Wed, 17 May 2017 17:44:25 +0300 Subject: [PATCH 5/9] debug --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 290c1a5..3eee878 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ COMPANY_NAME ?= onlyoffice -GIT_BRANCH ?= develop +GIT_BRANCH ?= origin/develop PRODUCT_NAME ?= documentserver-integration PRODUCT_VERSION ?= 0.0.0 BUILD_NUMBER ?= 0 From 3f8ac6ee7eda43f6d1542e0c23eec20537d07fd6 Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Mon, 22 May 2017 11:49:46 +0300 Subject: [PATCH 6/9] Change `MAINTAINER` line to label According to https://docs.docker.com/engine/reference/builder/#maintainer-deprecated `MAINTAINER` is deprecated, and `LABEL maintainer` should be used, since it give more flexebility --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 064d76c..d074b6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM ubuntu:14.04 -MAINTAINER Ascensio System SIA +LABEL maintainer Ascensio System SIA ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive From f8595615076c9d4334bd4b48c4e6a1d9ab708b01 Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Tue, 20 Jun 2017 17:31:20 +0300 Subject: [PATCH 7/9] Use COPY instead of add According to https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#add-or-copy It's prefered to use COPY if no need to extract tars --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d074b6f..2260c35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,8 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ service nginx stop && \ rm -rf /var/lib/apt/lists/* -ADD config /app/onlyoffice/setup/config/ -ADD run-document-server.sh /app/onlyoffice/run-document-server.sh +COPY config /app/onlyoffice/setup/config/ +COPY run-document-server.sh /app/onlyoffice/run-document-server.sh EXPOSE 80 443 From 810d49fd53dcf003ed1421b05257ac9d5b62e1cc Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Tue, 20 Jun 2017 18:54:59 +0300 Subject: [PATCH 8/9] Remove specific version of `update-notifier-common` Bug was fixed https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1683713 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2260c35..c485c28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ apt-get -y update && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ - apt-get --force-yes -yq install update-notifier-common=0.154.1 software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor pwgen fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ + apt-get --force-yes -yq install software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor pwgen fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \ sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \ sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" && \ From dd9583498ad86cbf82d2f246a82f9cf41b7b6da0 Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Tue, 20 Jun 2017 19:08:07 +0300 Subject: [PATCH 9/9] Split long apt-get and sort it --- Dockerfile | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c485c28..d20edbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,40 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ apt-get -y update && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ - apt-get --force-yes -yq install software-properties-common adduser postgresql postgresql-client redis-server rabbitmq-server nginx-extras nodejs libstdc++6 libcurl3 libxml2 libboost-regex-dev zlib1g supervisor pwgen fonts-dejavu fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito fonts-takao-gothic fonts-opensymbol libxss1 libgtkglext1 libcairo2 xvfb libxtst6 libgconf2-4 libasound2 bomstrip libnspr4 libnss3 libnss3-nssdb nano htop && \ + apt-get --force-yes -yq install adduser \ + bomstrip \ + fonts-crosextra-carlito \ + fonts-dejavu \ + fonts-liberation \ + fonts-opensymbol \ + fonts-takao-gothic \ + htop \ + libasound2 \ + libboost-regex-dev \ + libcairo2 \ + libcurl3 \ + libgconf2-4 \ + libgtkglext1 \ + libnspr4 \ + libnss3 \ + libnss3-nssdb \ + libstdc++6 \ + libxml2 \ + libxss1 \ + libxtst6 \ + nano \ + nginx-extras \ + nodejs \ + postgresql \ + postgresql-client \ + pwgen \ + rabbitmq-server \ + redis-server \ + software-properties-common \ + supervisor \ + ttf-mscorefonts-installer \ + xvfb \ + zlib1g && \ sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \ sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \ sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" && \