Docker container for building Lucidworks Fusion docs.
NOTE: This is a public repo.
Docker for Mac / Docker for Windows
Download and install the appropriate flavor of the Docker tools for your machine:
Details on this toolset are found in this Docker blogpost
Set up .ssh id files for GitHub
This docker container will be used to build the Fusion documentation from the Lucidworks GitHub repo
GitHub provides two ways to clone a directory: Clone with SSH or Clone with HTTPS.
Clone with HTTPS
If you clone with HTTPS, git will prompt you for you GitHub login and password.
Clone with SSH
Cloning with SSH uses the SSH authentication agent, name
ssh-agent which uses the file
- To create an
id_rsafile, run the command:
ssh-keygen -t rsa -b 4096.
- Make sure that your GitHub account settings include this public key:
go to https://github.com/settings/ssh, click the "New SSH Key" button in the top-right, and paste your rsa_id.pub into the "Key" area.
- Finally, make these available to the SSH authentication agent via command:
On the MacOS, when the Docker app is running, the docker whale icon will be present in the top toolbar. If it isn't running, launch the Docker app from the Applications folder.
Clicking on this icon opens the drop-down menu, choose "Open Kitematic"
Note: if Kitematic is not already installed, the Docker app will provide a download link. Use this to download the .zip file which contains the app. The Mac OS security won't allow this app run and it will fail with message that the download is corrupt. There is a workaround described here
Launch Docker, launch Kitematic.
Create fusion-doc-builder, login to container, checkout Fusion-docs repo
- In the search field, enter fusion-doc-builder.
- In the search results, click Create on fusion-doc-builder.
- Once the fusion-doc-builder container is running, Kitematic displays the access URLs for all open ports. Find the access URL for port 22, the port reserved for ssh access. e.g., Docker port
22/tcp, access URL
- Launch the Docker CLI.
- Log in to the container as the "jenkins" user, using the access URL port and IP address for port 22:
ssh -p <port> jenkins@<IP-address>. The user "jenkins" has password "jenkins".
- Clone the Fusion-docs repo (it's a private repo, hence the need for GitHub SSH key):
git clone firstname.lastname@example.org:Lucidworks/Fusion-docs.git
Build the Fusion documentation site
- Choose the version of the documentation to build:
git checkout <version-to-build>
- Run the build script:
Test the build using
Jekyll is a Ruby application and uses the following environment variable to locate jekyll and its components:
The following command sequence will set up the jekyll server in the docker container and serve the generated site
cd jekyll export PATH=/usr/local/bundle/bin:$PATH export GEM_HOME=/usr/local/bundle export GEM_PATHS=/usr/local/bundle:/usr/local/lib/ruby/gems/2.3.0 jekyll serve --host 0.0.0.0 --skip-initial-build --no-watch
The Jekyll server runs on port 4000 by default. In Kitematic, find the access URL for the container's
For example if Kitematic lists
localhost:32771 as the access URL,
to browse the documentation the browser request URL would be:
http://<container port access url 32771/index.html.
Build the Fusion documentation pdfs
- Run the script
./build-print.shto generate the set of pdfs.
- Copy these back to your host machine using
from your host machine command line:
docker cp fusion-doc-builder:/home/jenkins/Fusion-docs/pdfs/Fusion_Documentation_3_0.pdf .