Skip to content

Instantly share code, notes, and snippets.

@pranavk
Created Jan 19, 2018
Embed
What would you like to do?
FROM collabora/code
ADD start.sh /
CMD bash start.sh
#!/bin/sh
# Fix lool resolv.conf problem (wizdude)
rm /opt/lool/systemplate/etc/resolv.conf
ln -s /etc/resolv.conf /opt/lool/systemplate/etc/resolv.conf
# Replace trusted host and set admin username and password
#perl -pi -e "s/localhost<\/host>/${domain}<\/host>/g" /etc/loolwsd/loolwsd.xml
#perl -pi -e "s/<username desc=\"The username of the admin console. Must be set.\"><\/username>/<username desc=\"The username of the admin console. Must be set.\">${username}<\/username>/" /etc/loolwsd/loolwsd.xml
#perl -pi -e "s/<password desc=\"The password of the admin console. Must be set.\"><\/password>/<password desc=\"The password of the admin console. Must be set.\">${password}<\/password>/g" /etc/loolwsd/loolwsd.xml
perl -pi -e "s/<server_name desc=\"Hostname:port of the server running loolwsd. If empty, it's derived from the request.\" type=\"string\" default=\"\"><\/server_name>/<server_name desc=\"Hostname:port of the server running loolwsd. If empty, it's derived from the request.\" type=\"string\" default=\"\">${server_name}<\/server_name>/g" /etc/loolwsd/loolwsd.xml
# Start loolwsd
su -c "/usr/bin/loolwsd --version --disable-ssl --o:storage.filesystem[@allow]=true --o:logging.level=trace --o:logging.file.property[7]=true --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.3 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd" -s /bin/bash lool
@pranavk

This comment has been minimized.

Copy link
Owner Author

@pranavk pranavk commented Jan 19, 2018

Copy both of these files in a directory and then run following in that directory:
docker build ./

Note down the image hash built from it and then run it using docker run. Check if it fails to fork children in first attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment