Skip to content

Instantly share code, notes, and snippets.

@pranavk
Created January 19, 2018 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pranavk/e06505e868cac9299b0d054f38d01e42 to your computer and use it in GitHub Desktop.
Save pranavk/e06505e868cac9299b0d054f38d01e42 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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