diff --git a/docker/collabora/Dockerfile b/docker/collabora/Dockerfile index 3cebe4d8..d2389fa7 100644 --- a/docker/collabora/Dockerfile +++ b/docker/collabora/Dockerfile @@ -1,66 +1,67 @@ FROM almalinux:8 LABEL maintainer="contact@apheleia-it.ch" LABEL dist=centos8 LABEL tier=${TIER} ENV DISTRO=centos8 ENV LANG=en_US.utf8 ENV LC_ALL=en_US.utf8 # Add EPEL. RUN dnf -y install dnf-plugin-config-manager && \ dnf config-manager --set-enabled powertools && \ dnf -y install epel-release && \ dnf -y install iputils vim-enhanced bind-utils && \ dnf clean all RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 ARG REPOSITORY RUN id cool || (groupadd -g 1001 cool && useradd -d /opt/cool/ -u 1001 -g 1001 cool) RUN rpm --import "$REPOSITORY/repodata/repomd.xml.key" && \ dnf config-manager --add-repo "$REPOSITORY" && \ dnf -y --setopt tsflags= install \ openssl \ xmlstarlet \ collabora-online-brand \ coolwsd \ collaboraoffice-dict-de \ collaboraofficebasis-de \ collaboraoffice-dict-en \ collaboraofficebasis-en-GB \ collaboraoffice-dict-es \ collaboraofficebasis-es \ collaboraoffice-dict-fr \ collaboraofficebasis-fr \ collaboraoffice-dict-it \ collaboraofficebasis-it \ collaboraoffice-dict-nl \ collaboraofficebasis-nl \ collaboraoffice-dict-pt-BR \ collaboraofficebasis-pt-BR \ collaboraoffice-dict-pt-PT \ collaboraofficebasis-pt \ collaboraoffice-dict-ru \ collaboraofficebasis-ru && \ dnf clean all RUN sed -i -r -e 's/^SELINUX=.*$/SELINUX=permissive/g' /etc/selinux/config 2>/dev/null || : RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit && \ setcap cap_sys_admin=ep /usr/bin/coolmount WORKDIR /opt/cool/ ADD init.sh /init.sh +ADD coolwsd.xml /etc/coolwsd/coolwsd.xml RUN chown -R 1001:0 /etc/coolwsd /opt/ && \ chmod -R g=u /etc/coolwsd /opt/ USER 1001 CMD ["/init.sh"] EXPOSE 9980 diff --git a/docker/collabora/coolwsd.xml b/docker/collabora/coolwsd.xml new file mode 100644 index 00000000..69e766fc --- /dev/null +++ b/docker/collabora/coolwsd.xml @@ -0,0 +1,303 @@ + + + + + + + + false + + de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru + + + + + + + + + + + false + + + + + + + + + + false + + 1 + + + 4 + 5 + false + 96 + 3600 + 30 + 300 + false + 0 + 8000 + 0 + 0 + 100 + 5 + 100 + 500 + 5000 + + 10000 + 60 + 300 + 3072 + 85 + 120 + + + + true + 120 + 900 + + + + true + + warning + trace + notice + fatal + false + + -INFO-WARN + + + /var/log/coolwsd.log + never + timestamp + true + 10 days + 10 + true + false + + + false + 82589933 + + false + false + + + + /var/log/coolwsd.trace.json + + false + + + + + + + false + + + + + all + any + + + + 192\.168\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} + 127\.0\.0\.1 + ::ffff:127\.0\.0\.1 + ::1 + 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + + + + + + + + + + false + + true + /etc/coolwsd/cert.pem + /etc/coolwsd/key.pem + /etc/coolwsd/ca-chain.cert.pem + + + 1000 + + + + + + + false + 31536000 + + + + true + true + 1800 + false + 1 + false + false + + + + + + + + + + default + true + + + + + 0 + + 900 + + + + .* + + + + + + + + true + + + + + + + + + false + false + + + + true + true + true + true + + + + + + + + + + + + + + + false + + + + + false + + + log + + + + + + + + localhost + 10\.0-9{1,3}\.0-9{1,3}\.0-9{1,3} + 172\.301\.0-9{1,3}\.0-9{1,3} + + false + .uno:DataDataPilotRun .uno:RecalcPivotTable .uno:DeletePivotTable .uno:SamplingDialog .uno:DescriptiveStatisticsDialog .uno:AnalysisOfVarianceDialog .uno:CorrelationDialog .uno:CovarianceDialog .uno:ExponentialSmoothingDialog .uno:MovingAverageDialog .uno:RegressionDialog .uno:TTestDialog .uno:FTestDialog .uno:ZTestDialog .uno:ChiSquareTestDialog .uno:FourierAnalysisDialog .uno:Validation .uno:DataFilterSpecialFilter .uno:TrackChanges .uno:AcceptTrackedChanges .uno:InsertReferenceField .uno:Watermark .uno:InsertIndexesEntry .uno:InsertMultiIndex .uno:SlideMasterPage exportepub downloadas-rtf masterslidebutton + Unlock your potential + https://www.collaboraoffice.com/subscriptions/ + Head over to the details page and discover all the features: + + Review and write with ease + Get a better picture of your data + Nail your next presentation + Draw and get organized + + + + + + + + true + + https://help.collaboraoffice.com/help.html? + + true + + diff --git a/docker/collabora/init.sh b/docker/collabora/init.sh index 164f3af5..04016b43 100755 --- a/docker/collabora/init.sh +++ b/docker/collabora/init.sh @@ -1,29 +1,25 @@ #!/bin/sh -xmlstarlet edit -L --update "/config/ssl/enable" --value "false" /etc/coolwsd/coolwsd.xml -xmlstarlet edit -L --update "/config/ssl/termination" --value "true" /etc/coolwsd/coolwsd.xml -xmlstarlet edit -L --update "/config/admin_console/enable" --value "false" /etc/coolwsd/coolwsd.xml -xmlstarlet edit -L --update "/config/storage/wopi/host[text()='localhost']" --value ".*" /etc/coolwsd/coolwsd.xml mkdir -p /tmp/ssl/ pushd /tmp/ssl/ mkdir -p certs/ca openssl rand -writerand /opt/cool/.rnd openssl genrsa -out certs/ca/root.key.pem 2048 openssl req -x509 -new -nodes -key certs/ca/root.key.pem -days 9131 -out certs/ca/root.crt.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=Dummy Authority" mkdir -p certs/servers mkdir -p certs/tmp mkdir -p certs/servers/localhost openssl genrsa -out certs/servers/localhost/privkey.pem 2048 if test "${cert_domain-set}" = set; then openssl req -key certs/servers/localhost/privkey.pem -new -sha256 -out certs/tmp/localhost.csr.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost" else openssl req -key certs/servers/localhost/privkey.pem -new -sha256 -out certs/tmp/localhost.csr.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=${cert_domain}" fi openssl x509 -req -in certs/tmp/localhost.csr.pem -CA certs/ca/root.crt.pem -CAkey certs/ca/root.key.pem -CAcreateserial -out certs/servers/localhost/cert.pem -days 9131 mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem popd exec /usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:logging.color=false --o:stop_on_config_change=true