From 94cb962049e83bfbf2ded88ff828fcd747658dae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jari-Matti=20M=C3=A4kel=C3=A4?= <jmjmak@utu.fi>
Date: Thu, 8 Apr 2021 18:43:11 +0000
Subject: [PATCH] Update README.md

---
 README.md | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/README.md b/README.md
index 8c3c605..20fa3a3 100644
--- a/README.md
+++ b/README.md
@@ -13,25 +13,55 @@ Simple Docker image for building thesis documents
 
 ## Profiles
 
+The smaller images are provided just for testing the build without
+stressing the servers too much. The default profile is recommended
+for building a thesis.
+
 * `texlive-minimal.profile`: TeXLive minimal scheme
 * `texlive-small.profile`: TeXLive small scheme
 * `texlive.profile`: TeXLive custom scheme (medium + some extras)
 
 ## Fetching the image from UTU GitLab
 
+Pulling the image from UTU GitLab requires a valid user account.
+Using the prebuilt image is recommended unless you want to build your own.
+
 ```sh
 $ docker login registry.gitlab.utu.fi
 $ docker pull registry.gitlab.utu.fi/tech/soft/thesis-builder
 ```
 
+## Building the image locally
+
+To build the default profile:
+
+```sh
+$ git clone https://gitlab.utu.fi/tech/soft/thesis-builder
+$ cd thesis-builder
+$ docker build .
+```
+
+To build the 'minimal' profile:
+
+```sh
+$ git clone https://gitlab.utu.fi/tech/soft/thesis-builder
+$ cd thesis-builder
+$ docker build --build-arg TEXPROFILE=texlive-minimal.profile .
+```
+
 ## Using from the command line
 
+This example mounts the current directory to /src inside the
+Docker container. Mainly useful as a starting point.
+
 ```sh
 $ docker run --mount type=bind,source=$(pwd),target=/src -it registry.gitlab.utu.fi/tech/soft/thesis-builder:latest
 ```
 
 ## Using in GitLab CI
 
+Assumes the 'thesis.tex' is located in the project's root directory.
+
 ```yaml
 image: registry.gitlab.utu.fi/tech/soft/thesis-builder:latest
 
-- 
GitLab