<commit_before># Docker

## Benefits of Docker with uPortal

  - Includes all dependencies and tooling out of the box
  - Capture known OS flavor and version
  - JDK version explicitly rolled into image
  - Transient dependencies locked
  - Images are files that can be managed by Ops for updates/rollbacks
    - Images are only about 1Gb
  - Images are portable!!

## uPortal Docker Tasks

  - dockerBuildImageCli
    - Builds the Docker image used to invoke Import/Export tasks from within a container
    - Copies in several files / directories from uPortal-start
  - dockerBuildImageDemo
    - Builds the uPortal Demo Docker image
    - Runs hsqlStart and dataInit on startup
  - dockerBuildImageWeb
    - Builds the basic web server-only Docker image
    - Only captures Tomcat, uPortal and portlet webapps
  - dockerBuildImages
    - All-in-one Gradle task for building all the Docker image
    - Takes about 20 minutes on my laptop to build all 3 images

## Building and Running uPortal Demo

Here are the steps to setup uPortal Demo as a Docker image and then run it as a container.

### Prerequisites

  - Docker installed for non-admin users
  - Java 8 JDK installed and configured (e.g. JAVA_HOME set)
  - uPortal-start repository present

### Steps

  - Stop HSQL and Tomcat, if they are running<commit_msg>doc(docker): Clarify that uPortal should be built before building docker image<commit_after># Docker

## Benefits of Docker with uPortal

  - Includes all dependencies and tooling out of the box
  - Capture known OS flavor and version
  - JDK version explicitly rolled into image
  - Transient dependencies locked
  - Images are files that can be managed by Ops for updates/rollbacks
    - Images are only about 1Gb
  - Images are portable!!

## uPortal Docker Tasks

  - dockerBuildImageCli
    - Builds the Docker image used to invoke Import/Export tasks from within a container
    - Copies in several files / directories from uPortal-start
  - dockerBuildImageDemo
    - Builds the uPortal Demo Docker image
    - Runs hsqlStart and dataInit on startup
  - dockerBuildImageWeb
    - Builds the basic web server-only Docker image
    - Only captures Tomcat, uPortal and portlet webapps
  - dockerBuildImages
    - All-in-one Gradle task for building all the Docker image
    - Takes about 20 minutes on my laptop to build all 3 images

## Building and Running uPortal Demo

Here are the steps to setup uPortal Demo as a Docker image and then run it as a container.

### Prerequisites

  - Docker installed for non-admin users
  - Java 8 JDK installed and configured (e.g. JAVA_HOME set)
  - uPortal-start repository present

### Steps

  - Build and run uPortal to confirm it works as expected
  - Stop HSQL and Tomcat, if they are running
{'fraction_non_alphanumeric': 0.04273813835566823, 'fraction_numerical': 0.003621876131836291, 'mean_word_length': 3.2557781201848996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4792515', 'n_tokens_mistral': 810, 'n_tokens_neox': 743, 'n_words': 369}