update base image version to 16.04

This commit is contained in:
Alexey Golubev 2017-12-12 17:02:14 +03:00
parent f541c97720
commit 89fd259804
2 changed files with 45 additions and 39 deletions

@ -1,51 +1,54 @@
FROM ubuntu:14.04 FROM ubuntu:16.04
LABEL maintainer Ascensio System SIA <support@onlyoffice.com> LABEL maintainer Ascensio System SIA <support@onlyoffice.com>
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
apt-get -y update && \ apt-get -y update && \
apt-get --force-yes -yq install wget apt-transport-https curl && \ apt-get -yq install wget apt-transport-https curl locales && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CB2DE8E5 && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CB2DE8E5 && \
echo "deb http://archive.ubuntu.com/ubuntu precise main universe multiverse" >> /etc/apt/sources.list && \
locale-gen en_US.UTF-8 && \ locale-gen en_US.UTF-8 && \
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get -y update && \ apt-get -y update && \
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
apt-get --force-yes -yq install adduser \ apt-get -yq install \
bomstrip \ adduser \
fonts-crosextra-carlito \ bomstrip \
fonts-dejavu \ fonts-crosextra-carlito \
fonts-liberation \ fonts-dejavu \
fonts-opensymbol \ fonts-liberation \
fonts-takao-gothic \ fonts-opensymbol \
htop \ fonts-takao-gothic \
libasound2 \ htop \
libboost-regex-dev \ libasound2 \
libcairo2 \ libboost-regex-dev \
libcurl3 \ libcairo2 \
libgconf2-4 \ libcurl3 \
libgtkglext1 \ libgconf2-4 \
libnspr4 \ libgtkglext1 \
libnss3 \ libnspr4 \
libnss3-nssdb \ libnss3 \
libstdc++6 \ libnss3-nssdb \
libxml2 \ libstdc++6 \
libxss1 \ libxml2 \
libxtst6 \ libxss1 \
nano \ libxtst6 \
nginx-extras \ nano \
nodejs \ net-tools \
postgresql \ netcat \
postgresql-client \ nginx-extras \
pwgen \ nodejs \
rabbitmq-server \ postgresql \
redis-server \ postgresql-client \
software-properties-common \ pwgen \
supervisor \ rabbitmq-server \
ttf-mscorefonts-installer \ redis-server \
xvfb \ software-properties-common \
zlib1g && \ sudo \
supervisor \
ttf-mscorefonts-installer \
xvfb \
zlib1g && \
[ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -eq 61 ] && \ [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -eq 61 ] && \
sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \ sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \
sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \ sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \
@ -68,7 +71,7 @@ ARG PRODUCT_NAME=onlyoffice-documentserver
RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \ RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \
apt-get -y update && \ apt-get -y update && \
service postgresql start && \ service postgresql start && \
apt-get --force-yes -yq install $PRODUCT_NAME && \ apt-get --allow-unauthenticated -yq install $PRODUCT_NAME && \
service postgresql stop && \ service postgresql stop && \
service supervisor stop && \ service supervisor stop && \
chmod 755 /app/onlyoffice/*.sh && \ chmod 755 /app/onlyoffice/*.sh && \

@ -45,7 +45,7 @@ JSON_EXAMPLE="json -q -f ${ONLYOFFICE_EXAMPLE_CONFIG}"
LOCAL_SERVICES=() LOCAL_SERVICES=()
PG_VERSION=9.3 PG_VERSION=9.5
PG_NAME=main PG_NAME=main
PGDATA=/var/lib/postgresql/${PG_VERSION}/${PG_NAME} PGDATA=/var/lib/postgresql/${PG_VERSION}/${PG_NAME}
PG_NEW_CLUSTER=false PG_NEW_CLUSTER=false
@ -214,6 +214,9 @@ update_nginx_settings(){
sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF} sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF} sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
# turn on http2
sed 's,\(443 ssl\),\1 http2,' -i ${NGINX_ONLYOFFICE_CONF}
# if dhparam path is valid, add to the config, otherwise remove the option # if dhparam path is valid, add to the config, otherwise remove the option
if [ -r "${SSL_DHPARAM_PATH}" ]; then if [ -r "${SSL_DHPARAM_PATH}" ]; then
sed 's,\(\#* *\)\?\(ssl_dhparam \).*\(;\)$,'"\2${SSL_DHPARAM_PATH}\3"',' -i ${NGINX_ONLYOFFICE_CONF} sed 's,\(\#* *\)\?\(ssl_dhparam \).*\(;\)$,'"\2${SSL_DHPARAM_PATH}\3"',' -i ${NGINX_ONLYOFFICE_CONF}