This documentation is for WSO2 Dockerfiles version 1.1.0. View documentation for the latest release.
Page Comparison - Building Docker Images (v.5 vs v.6) - WSO2 Dockerfiles 1.1.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Navigate to the relevant product's Docker image directory <DOCKERFILES_HOME>/<PRODUCT_NAME>. For example, for WSO2 API Manager: <DOCKERFILES_HOME>/<APIM_HOME>
  2. Add the product pack and JDK.
    • Download and copy JDK 1.7 (jdk-7u80-linux-x64.tar.gz) pack to the <DOCKERFILES_HOME>/common/provision/default/files directory.
    • Download the relevant product pack and copy them to the <DOCKERFILES_HOME>/common/provision/default/files directory. For example, for WSO2 API Manager 1.9.1 download the product pack and copy the zip file to the <DOCKERFILES_HOME>/common/scripts/provision/default/files directory.
  3. Optionally, identify the build script options based on the selected build provisioning method.
    Enter build.sh in the terminal to view the build.sh script usage for the respective product. For example, the following is the build.sh script usage for WSO2 API Manager.

    Anchor
    Usage
    Usage

    Code Block
    Options:
     
     -v [REQUIRED] Product version of WSO2AM
     -l [OPTIONAL] '|' separated WSO2AM profiles to build. "default" is selected if no value is specified.
     -i [OPTIONAL] Docker image version.
     -e [OPTIONAL] Product environment. If not specified this is defaulted to "dev".
     -o [OPTIONAL] Preferred organization name. If not specified, will be kept empty.
     -q [OPTIONAL] Quiet flag. If used, the docker build run output will be suppressed.
     -r [OPTIONAL] Provisioning method. If not specified this is defaulted to "default". Available provisioning methods are default, puppet, README.md.
     -t [OPTIONAL] Image name. If this is specified, it will be used as the image name instead of "wso2{product}" format.
     -y [OPTIONAL] Automatic yes to prompts; assume "y" (yes) as answer to all prompts and run non-interactively.
     -s [OPTIONAL] Platform to be used to run the Dockerfile (ex.: kubernetes). If not specified will assume the value as 'default'.
  4. Build the Docker image by executing the build.sh script based on the selected build provisioning method.
    The build script options vary based on the selected build provisioning method as follows:

    Localtab Group
    Localtab
    activetrue
    titleDefault
    Code Block
    languagebash
    titleFormat
    ./build.sh -v <PRODUCT_VERSION>
    Code Block
    languagebash
    titleExample
    ./build.sh -v 1.10.0
    Localtab
    titlePuppet

    The following format and example include some options that are used when building the Docker image using Puppet. For more options, see the build script usage, which was discussed above.

    Code Block
    languagebash
    titleFormat
    ./build.sh -v <PRODUCT_VERSION> -r <PROVISIONING_METHOD> -s <PLATFORM_USED_TO_RUN_DOCKER> -l <PROFILES_TO_BUILD_FOR_CLUSTERING_PURPOSES>
    Code Block
    languagebash
    titleExample
    ./build.sh -v 1.10.0 -r puppet -s kubernetes -l worker

...