example_test.go Documentation

TypeScript repository by @dunglas. Model Context Protocol (MCP) server & tools.

0 stars TypeScript TypeScript 1 file ยท ~34,625 tokens
RAW Doc

1. Project Overview & Quickstart (dunglas/example_test.go)

example_test.go

Open-source repository dunglas/example_test.go

Repository Details

Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.

2. Official Technical Reference & Guides (dunglas/docs)

File: adminer/README.md

Quick reference

Quick reference (cont.)

Adminer

What is Adminer?

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB.

adminer.org

How to use this image

Standalone

console
$ docker run --link some_database:db -p 8080:8080 adminer

Then you can hit http://localhost:8080 or http://host-ip:8080 in your browser.

FastCGI

If you are already running a FastCGI capable web server you might prefer running Adminer via FastCGI:

console
$ docker run --link some_database:db -p 9000:9000 adminer:fastcgi

Then point your web server to port 9000 of the container.

Note: This exposes the FastCGI socket to the Internet. Make sure to add proper firewall rules or use a private Docker network instead to prevent a direct access.

... via [`docker stack deploy`](https://docs.docker.com/engine/reference/commandline/stack_deploy/) or [`docker-compose`](https://github.com/docker/compose)

Example stack.yml for adminer:

yaml
# Use root/example as user/password credentials

version: '3.1'

services:

  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080

  db:
    image: mysql:5.6
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example

Run docker stack deploy -c stack.yml adminer (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080, or http://host-ip:8080 (as appropriate).

Loading plugins

This image bundles all official Adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/master/plugins.

To load plugins you can pass a list of filenames in ADMINER_PLUGINS:

console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='tables-filter tinymce' adminer

If a plugin requires parameters to work correctly you will need to add a custom file to the container:

console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='login-servers' adminer
Unable to load plugin file "login-servers", because it has required parameters: servers
Create a file "/var/www/html/plugins-enabled/login-servers.php" with the following contents to load the plugin:

<?php
require_once('plugins/login-servers.php');

/** Set supported servers
    * @param array array($domain) or array($domain => $description) or array($category => array())
    * @param string
    */
return new AdminerLoginServers(
    $servers = ???,
    $driver = 'server'
);

To load a custom plugin you can add PHP scripts that return the instance of the plugin object to /var/www/html/plugins-enabled/.

Choosing a design

The image bundles all the designs that are available in the source package of adminer. You can find the list of designs on GitHub: https://github.com/vrana/adminer/tree/master/designs.

To use a bundled design you can pass its name in ADMINER_DESIGN:

console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_DESIGN='nette' adminer

To use a custom design you can add a file called /var/www/html/adminer.css.

Usage with external server

You can specify the default host with the ADMINER_DEFAULT_SERVER environment variable. This is useful if you are connecting to an external server or a docker container named something other than the default db.

console
docker run -p 8080:8080 -e ADMINER_DEFAULT_SERVER=mysql adminer

Supported Drivers

While Adminer supports a wide range of database drivers this image only supports the following out of the box:

  • MySQL
  • PostgreSQL
  • SQLite
  • SimpleDB
  • Elasticsearch

To add support for the other drivers you will need to install the following PHP extensions on top of this image:

  • pdo_dblib (MS SQL)
  • oci8 (Oracle)
  • interbase (Firebird)
  • mongodb (MongoDB)

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's adminer/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: adoptopenjdk/README.md

Quick reference

(See "What's the difference between 'Shared' and 'Simple' tags?" in the FAQ.)

Simple Tags

Shared Tags

Quick reference (cont.)

Overview

The images in this repository contain OpenJDK binaries that are built by AdoptOpenJDK and contain both HotSpot and Eclipse OpenJ9 JVMs.

What is AdoptOpenJDK ?

AdoptOpenJDK is a community of Javaโ„ข user group members, Java developers and vendors who are advocates of OpenJDK, the open source project which forms the basis of the Java programming language and platform. AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. AdoptOpenJDK builds and tests binaries for different source code streams based upon OpenJDK. Our binaries undergo extensive testing, and the Releases have passed all the available OpenJDK test suites and our additional tests (donated by the community), ensuring the best quality binary available.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.

What is Eclipse OpenJ9 ?

Eclipse OpenJ9 is a high performance, scalable, Java virtual machine (JVM) implementation that has a proven track record of running Java applications in production environments. Contributed to the Eclipse project by IBM, the OpenJ9 JVM underpins the IBM SDK, Java Technology Edition product that is a core component of many IBM Enterprise software products. Continued development of OpenJ9 at the Eclipse foundation ensures wider collaboration, fresh innovation, and the opportunity to influence the development of OpenJ9 for the next generation of Java applications. OpenJDK binaries that include Eclipse OpenJ9 are available through AdoptOpenJDK.

Images

There are two types of Docker images here: the Java Development Kit (JDK) and the Java Runtime Environment (JRE). These images can be used as the basis for custom built images for running your applications.

Multi-Arch Image

Docker Images for the following architectures are now available:

  • HotSpot
    • amd64, arm32v7, arm64v8, ppc64le, s390x, windows-amd64
  • Eclipse OpenJ9
    • amd64, ppc64le, s390x, windows-amd64

How to use this Image

To run a pre-built jar file with the latest OpenJDK 11 with HotSpot JRE image, use the following Dockerfile:

dockerfile
FROM adoptopenjdk:11-jre-hotspot
RUN mkdir /opt/app
COPY japp.jar /opt/app
CMD ["java", "-jar", "/opt/app/japp.jar"]

To do the same with the latest OpenJDK 11 with Eclipse OpenJ9 JRE image, use the following Dockerfile:

dockerfile
FROM adoptopenjdk:11-jre-openj9
RUN mkdir /opt/app
COPY japp.jar /opt/app
CMD ["java", "-jar", "/opt/app/japp.jar"]

You can build and run the Docker Image as shown in the following example:

console
docker build -t japp .
docker run -it --rm japp

If you want to place the jar file on the host file system instead of inside the container, you can mount the host path onto the container by using the following commands:

dockerfile
FROM adoptopenjdk:12.0.1_12-jdk-openj9-0.14.1
CMD ["java", "-jar", "/opt/app/japp.jar"]
console
docker build -t japp .
docker run -it -v /path/on/host/system/jars:/opt/app japp

Image Variants

The adoptopenjdk images come in many flavors, each designed for a specific use case.

`adoptopenjdk:`

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

Some of these tags may have names like focal in them. These are the suite code names for releases of Ubuntu and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Ubuntu.

`adoptopenjdk:-windowsservercore`

This image is based on Windows Server Core (microsoft/windowsservercore). As such, it only works in places which that image does, such as Windows 10 Professional/Enterprise (Anniversary Edition) or Windows Server 2016.

For information about how to get Docker running on Windows, please see the relevant "Quick Start" guide provided by Microsoft:

License

The Dockerfiles and associated scripts are licensed under the Apache License, Version 2.0.

Licenses for the products installed within the images:

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's adoptopenjdk/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: aerospike/README.md

Quick reference

Quick reference (cont.)

Aerospike

Aerospike is an open source distributed database. Aerospike is built on a "shared nothing" architecture designed to reliably store terabytes of data with automatic fail-over, replication and cross data-center synchronization.

Documentation for Aerospike is available at http://aerospike.com/docs.

Using this Image

The following will run asd with all the exposed ports forwarded to the host machine.

console
$ docker run -d --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike

NOTE Although this is the simplest method to getting Aerospike up and running, but it is not the preferred method. To properly run the container, please specify a custom configuration with the access-address defined.

Custom Aerospike Configuration

By default, asd will use the configuration file at /etc/aerospike/aerospike.conf, which is added to the directory by the Dockerfile. To provide a custom configuration, you should first mount a directory containing the custom aerospike.conf file using the -v option for docker:

text
-v <DIRECTORY>:/opt/aerospike/etc

Where <DIRECTORY> is the path to a directory containing your custom aerospike.conf file. Next, you will want to tell asd to use the configuration file that was just mounted by using the --config-file option for aerospike:

text
--config-file /opt/aerospike/etc/aerospike.conf

This will tell asd to use the config file at /opt/aerospike/etc/aerospike.conf, which is mapped from <DIRECTORY>/aerospike.conf.

A full example:

console
$ docker run -d -v <DIRECTORY>:/opt/aerospike/etc --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike asd --foreground --config-file /opt/aerospike/etc/aerospike.conf

access-address Configuration

In order for Aerospike to properly broadcast its address to the cluster or applications, the access-address needs to be set in the configuration file. If it is not set, then the IP address within the container will be used, which is not accessible to other nodes.

To specify access-address in aerospike.conf:

text
network {
    service {
        address any                  # Listening IP Address
        port 3000                    # Listening Port
        access-address 192.168.1.100 # IP Address to be used by applications and other nodes in the cluster.
    }
    ...

Persistent Data Directory

With Docker, the files within the container are not persisted. To persist the data, you will want to mount a directory from the host to the guest's /opt/aerospike/data using the -v option:

text
-v <DIRECTORY>:/opt/aerospike/data

Where <DIRECTORY> is the path to a directory containing your data files.

A full example:

console
$ docker run -d -v <DIRECTORY>:/opt/aerospike/data --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike

Note: As of version 5.1.0.10 the Dockerfile no longer has /opt/aerospike/data as a Docker Volume by default.

Clustering

Aerospike recommends using Mesh Clustering. Mesh uses TCP point to point connections for heartbeats. Each node in the cluster maintains a heartbeat connection to all other nodes. Please see http://www.aerospike.com/docs/operations/configure/network/heartbeat/#mesh-unicast-heartbeat

Mesh Clustering

Mesh networking requires setting up links between each node in the cluster. This can be achieved in two ways:

  1. Define a configuration for each node in the cluster, as defined in Network Heartbeat Configuration.
  2. Use asinfo to send the tip command, to make the node aware of another node, as defined in tip command in asinfo.

For more details and examples of clustering Aerospike in Docker, please see Deploying Aerospike clusters with Docker.

Sending Performance Data to Aerospike

Aerospike Telemetry is a feature that allows us to collect certain use data โ€“ not the database data โ€“ on your Aerospike Community Edition server use. We'd like to know when clusters are created and destroyed, cluster size, cluster workload, how often queries are run, whether instances are deployed purely in-memory or with Flash. Aerospike Telemetry collects information from running Community Edition server instances every 10 minutes. The data helps us to understand how the product is being used, identify issues, and create a better experience for the end user. More Info

License

Copyright 2014-2015 Aerospike, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's aerospike/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: alpine/README.md

Quick reference

Quick reference (cont.)

What is Alpine Linux?

Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Docker images.

How to use this image

Usage

Use like you would any other base image:

dockerfile
FROM alpine:3.7
RUN apk add --no-cache mysql-client
ENTRYPOINT ["mysql"]

This example has a virtual image size of only 36.8MB. Compare that to our good friend Ubuntu:

dockerfile
FROM ubuntu:18.04
RUN apt-get update \
    && apt-get install -y --no-install-recommends mysql-client \
    && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["mysql"]

This yields us a virtual image size of about 145MB image.

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's alpine/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: alt/README.md

Quick reference

Quick reference (cont.)

  • Where to file issues:
    First of all, please, make sure that the developers are not aware of the bug in ALT bugzilla.

For create new bug, please use ALT's bugzilla page (choose Official image as component and include details about image problems in the description) or GitHub.

ALT Linux

This image serves as the official ALT image for the ALT Linux.

ALT Linux Team

ALT Linux Teamโ€‰is an international community numbering over 200 free software developers.

Sisyphus

Sisyphusโ€‰is a daily updated repository which serves as a basis for all ALT distributions. Sisyphus integrity supported by the ALT Linux Team, the original software packaging technology, and apt-get (apt-rpm) utility allows users to easily update the system and be aware of any news on the free software. This daily updated repository contains the latest software with all its benefits and pitfalls (latent sometimes).

The name Sisyphus comes from the Greek mythology. Uninterrupted efforts on improvement of technologies set in the repository make ALT Linux Team similar to tireless Sisyphus continuously rolling stones up the hill.

About Platform 9

As said above, Sisyphus is a frequently updated repository mainly designed for developers. Stable distributions by ALT are the best solution for those users preferring stability and predictability of the system to its functionality (primarily new and corporate users). Such stable distributions are based on stable Sisyphus repository slices called platforms. Platform 9 (p9) was created in June, 2019, and will be supported till December, 2022.

About this image

The alt:latest tag will always point the latest stable release (which is, at the time of this writing, alt:p9).

How It's Made

This image was created with the help of mkimage and hasher tools.

Mkimage is a tool used to create images with Linux kernel from the set Sisyphus-like repository. Mkimage uses a set of Makefiles and shell hooks.

Hasher is a tool used for safe and repeatable packaging in clean and controllable environment. This is achieved through creation of a minimum build environment in chroot, installation of all necessary packaging dependencies there, and packet assembly in the new environment. Every package requires a new build environment.

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's alt/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: amazoncorretto/README.md

Quick reference

Quick reference (cont.)

What is Amazon Corretto?

Corretto is a binary distribution of the Open Java Development Kit (OpenJDK) with long-term support from Amazon. Corretto is certified using the Java Technical Compatibility Kit (TCK) to ensure it meets the Java SE standard and is available on Linux, Windows, and macOS. It includes patches from Amazon that have proven useful in running our own services.

Why should I use Corretto?

Corretto is a reliable binary distribution of OpenJDK with the assurance of long-term support provided at no cost to you. Amazon runs Corretto internally on thousands of production services. Every modification we make to Corretto fixes or mitigates a problem we found running OpenJDK. Amazon also plans to apply urgent fixes (including security) when they are available and ready to use, outside of the regular quarterly cycle.

How is Corretto different from OpenJDK?

Corretto is a distribution of Open JDK with patches included by Amazon that are not yet integrated in the corresponding OpenJDK update projects. We focus on patches that improve performance or stability in OpenJDK, chosen based on Amazon's observations running large services.

What kinds of patches does Amazon intend to include in Corretto?

Patches will include security fixes, performance enhancements (e.g., speeding up frequently used functions), garbage collection scheduling, and preventing out-of-memory situations, as well as improved monitoring, reporting, and thread management.

Is there any cost associated with using Corretto?

Corretto is distributed by Amazon under an Open Source license at no cost to you. It is licensed under the terms of the GNU Public License version 2 with the Class Path Exception (GPLv2 with CPE). Amazon does not charge for its use or distribution.

What is included in Corretto's long-term support?

Amazon will provide security updates for Corretto 8 until at least June 2023. Updates are planned to be released quarterly. Corretto 11, corresponding to OpenJDK 11, will be available during the first half of 2019. Amazon will support Corretto 11 with quarterly updates until at least August 2024.

Can I use Corretto as a drop-in replacement for other JDKs?

Corretto is designed as a drop-in replacement for all Java SE distributions unless you are using features (e.g., Java Flight Recorder) not available in OpenJDK. Once Corretto binaries are installed on a host and correctly invoked to run your Java applications (e.g., using the alternatives command on Linux), existing command-line options, tuning parameters, monitoring, and anything else in place will continue to work as before.

Image Variants

The amazoncorretto images come in many flavors, each designed for a specific use case.

`amazoncorretto:`

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

`amazoncorretto:-alpine`

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

To minimize image size, it's uncommon for additional related tools (such as git or bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the alpine image description for examples of how to install packages if you are unfamiliar).

License

Amazon Corretto is released under the same open source license as OpenJDK, which is licensed under the GNU Public License version 2 with the Class Path Exception (GPLv2 with CPE).

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's amazoncorretto/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: amazonlinux/README.md

Quick reference

Quick reference (cont.)

What is Amazon Linux?

Amazon Linux is provided by Amazon Web Services (AWS). It is designed to provide a stable, secure, and high-performance execution environment for applications running on Amazon EC2. The full distribution includes packages that enable easy integration with AWS, including launch configuration tools and many popular AWS libraries and tools. AWS provides ongoing security and maintenance updates to all instances running Amazon Linux.

The Amazon Linux container image contains a minimal set of packages. To install additional packages, use yum.

AWS provides two versions of Amazon Linux: Amazon Linux 2 and Amazon Linux AMI.

For information on security updates for Amazon Linux, please refer to Amazon Linux 2 Security Advisories and Amazon Linux AMI Security Advisories. Note that Docker Hub's vulnerability scanning for Amazon Linux is currently based on RPM versions, which does not reflect the state of backported patches for vulnerabilities.

Where can I run Amazon Linux container images?

You can run Amazon Linux container images in any Docker based environment. Examples include, your laptop, in AWS EC2 instances, and ECS clusters.

How is Amazon Linux 2 different from Amazon Linux AMI?

There are three major differences in Amazon Linux 2 from its predecessors:

  1. it is available as a VM image for on-premises development and testing
  2. it includes systemd service and systems manager as opposed to System V init system and also includes new version of compiler and build tools
  3. it gives you the ability to install additional software packages through Extras mechanism without impacting the underlying LTS stability

Is Amazon Linux 2 build an official LTS build?

Yes. Amazon Linux 2 is supported by AWS for five years after release (June 2018).

What packages are available in the Amazon Linux containers?

Amazon Linux Docker container images contain a subset of the packages in the images for use on EC2 and as VMs in on-premises scenarios. The container images can be configured to use any of the full set of packages in images for EC2 and on-premises use. The Amazon Linux 2 container images comes with Extras included.

What is an Amazon Linux 2 Extra?

Extras is a new mechanism introduced in Amazon Linux 2 to enable the consumption of the newest versions of application software in a fully supported manner on a stable Amazon Linux 2 base. Extras help alleviate the compromise between stability of the OS and freshness of available software. For example, now you can install newer versions of Python being rest assured that the underlying operating system is stable. Examples of Extras include nginx, PostgreSQL, MariaDB, Go, and Rust.

How do Amazon Linux 2 Extras work?

Extras introduces the notion of topics to select software bundles. Each topic contains all the dependencies required for the software to install and function on Amazon Linux 2. For example, Rust is an Extras topic in the curated list provide by Amazon. It provides the toolchain and runtimes for Rust, the systems programming language. This topic includes the cmake build system for Rust, cargo - the rust package manager, and the LLVM based compiler toolchain for Rust. The packages associated with each topic are consumed via the well-known yum installation process.

How are Amazon Linux 2 Extras topics different from the packages available in yum repositories?

yum is a utility for package management of RPM packages. The base image of Amazon Linux 2 (LTS) includes access to repositories that already contain stable versions of popular packages that can be installed with yum. These packages are part of the long term support for Amazon Linux 2.

However, if you need a new software package or a newer version of an existing software package that is not included in the base Amazon Linux 2 image, Extras provide a way to install those packages in a supported manner. Extras is essentially a simplified mechanism to point yum to AWS curated sets of packages for a selected topic.

How do I install a software package from Extras repository in Amazon Linux 2?

Available packages can be listed with the amazon-linux-extras command. Packages can be installed with the amazon-linux-extras install command. Example: amazon-linux-extras install rust1

Will updates be available for Amazon Linux containers?

Similar to the Amazon Linux images for AWS EC2 and on-premises use, Amazon Linux container images will get ongoing updates from Amazon in the form of security updates, bug fix updates, and other enhancements. Security bulletins for Amazon Linux are available at https://alas.aws.amazon.com/

What support is available for Amazon Linux outside AWS?

With the availability of Amazon Linux 2, are there any changes to the existing version of Amazon Linux AMI?

With the availability of Amazon Linux 2, we are announcing that 2018.03 release of Amazon Linux AMI container image will be the last release for the current generation of Amazon Linux. Going forward, AWS will provide newer versions only for Amazon Linux 2.

Will AWS support the current version of Amazon Linux going forward?

Yes; in order to avoid any disruption to your existing applications and to facilitate migration to Amazon Linux 2, AWS will provide regular security updates for Amazon Linux 2018.03 AMI and container image for 2 years after the final LTS build is announced. You can also use all your existing support channels such as AWS Premium Support and Amazon Linux Discussion Forum to continue to submit support requests.

Is Amazon Linux 2 backward compatible with Amazon Linux AMI?

Due to the inclusion of new components in Amazon Linux 2 such as systemd, your applications running on the current version of Amazon Linux may require additional changes to run on Amazon Linux 2.

License

Amazon Linux is available under the GNU General Public License, version 2.0. Individual software packages are available under their own licenses; run rpm -qi [package name] or check /usr/share/doc/[package name]-* and /usr/share/licenses/[package name]-* for details.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's amazonlinux/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: arangodb/README.md

Quick reference

Quick reference (cont.)

What is ArangoDB?

ArangoDB is a multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID transactions if you require them. Scale horizontally and vertically with a few mouse clicks.

ArangoDB runs everywhere: On-prem, in the cloud and also on ArangoDB's Cloud Service Oasis.

The supported data models can be mixed in queries and allow ArangoDB to be the aggregation point for your data.

arangodb.com

Key Features in ArangoDB

Multi-Model Documents, graphs and key-value pairs โ€” model your data as you see fit for your application.

Joins Conveniently join what belongs together for flexible ad-hoc querying, less data redundancy.

Transactions Easy application development keeping your data consistent and safe. No hassle in your client.

Joins and Transactions are key features for flexible, secure data designs, widely used in RDBMSs that you won't want to miss in NoSQL products. You decide how and when to use Joins and strong consistency guarantees, keeping all the power for scaling and performance as choice.

Furthermore, ArangoDB offers a microservice framework called Foxx to build your own Rest API with a few lines of code.

ArangoDB Documentation

How to use this image

Start an ArangoDB instance

In order to start an ArangoDB instance, run:

console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance arangodb

Will create and launch the arangodb docker instance as background process. The Identifier of the process is printed. By default ArangoDB listen on port 8529 for request and the image includes EXPOSE 8529. If you link an application container it is automatically available in the linked container. See the following examples.

In order to get the IP arango listens on, run:

console
unix> docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance

Using the instance

In order to use the running instance from an application, link the container:

console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name my-app --link arangodb-instance:db-link arangodb

This will use the instance with the name arangodb-instance and link it into the application container. The application container will contain environment variables

text
DB_LINK_PORT_8529_TCP=tcp://172.17.0.17:8529
DB_LINK_PORT_8529_TCP_ADDR=172.17.0.17
DB_LINK_PORT_8529_TCP_PORT=8529
DB_LINK_PORT_8529_TCP_PROTO=tcp
DB_LINK_NAME=/naughty_ardinghelli/db-link

These can be used to access the database.

Exposing the port to the outside world

If you want to expose the port to the outside world, run:

console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d arangodb

ArangoDB listen on port 8529 for request and the image includes EXPOSE 8529. The -p 8529:8529 exposes this port on the host.

Choosing an authentication method

The ArangoDB image provides several authentication methods which can be specified via environment variables (-e) when using docker run

  1. ARANGO_RANDOM_ROOT_PASSWORD=1

    Generate a random root password when starting. The password will be printed to stdout (may be inspected later using docker logs)

  2. ARANGO_NO_AUTH=1

    Disable authentication. Useful for testing.

    WARNING Doing so in production will expose all your data. Make sure that ArangoDB is not directly accessible from the internet!

  3. ARANGO_ROOT_PASSWORD=somepassword

    Specify your own root password.

Note: this way of specifying logins only applies to single server installations. With clusters you have to provision the users via the root user with empty password once the system is up.

Command line options

You can pass arguments to the ArangoDB server by appending them to the end of the Docker command:

console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 arangodb --help

The entrypoint script starts the arangod binary by default and forwards your arguments.

You may also start other binaries, such as the ArangoShell:

console
unix> docker run -it arangodb arangosh --server.database myDB ...

Note that you need to set up networking for containers if arangod runs in one container and you want to access it with arangosh running in another container. It is easier to execute it in the same container instead. Use docker ps to find out the container ID / name of a running container:

console
unix> docker ps
CONTAINER ID   IMAGE     COMMAND                 CREATED      STATUS      PORTS                   NAMES
1234567890ab   arangodb  "/entrypoint.sh aranโ€ฆ"  2 hours ago  Up 2 hours  0.0.0.0:8529->8529/tcp  jolly_joker

Then use docker exec and the ID / name to run something inside of the existing container:

console
unix> docker exec -it jolly_joker arangosh

See more information about Configuration

Limiting resource utilization

arangod checks the following environment variables, which can be used to restrict how much memory and how many CPU cores it should use:

  • ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY (introduced in v3.6.3)

    This variable can be used to override the automatic detection of the total amount of RAM present on the system. One can specify a decimal number (in bytes). Furthermore, if G or g is appended, the value is multiplied by 2^30. If M or m is appended, the value is multiplied by 2^20. If K or k is appended, the value is multiplied by 2^10. That is, 64G means 64 gigabytes.

    The total amount of RAM detected is logged as an INFO message at server start. If the variable is set, the overridden value is shown. Various default sizes are calculated based on this value (e.g. RocksDB buffer cache size).

    Setting this option can in particular be useful in two cases:

    1. If arangod is running in a container and its cgroup has a RAM limitation, then one should specify this limitation in this environment variable, since it is currently not automatically detected.
    2. If arangod is running alongside other services on the same machine and thus sharing the RAM with them, one should limit the amount of memory using this environment variable.
  • ARANGODB_OVERRIDE_DETECTED_NUMBER_OF_CORES (introduced in v3.7.1)

    This variable can be used to override the automatic detection of the number of CPU cores present on the system.

    The number of CPU cores detected is logged as an INFO message at server start. If the variable is set, the overridden value is shown. Various default values for threading are calculated based on this value.

    Setting this option is useful if arangod is running in a container or alongside other services on the same machine and shall not use all available CPUs.

Persistent Data

ArangoDB supports two different storage engines from version 3.2 to 3.6. You can choose them while instantiating the container with the environment variable ARANGO_STORAGE_ENGINE. With mmfiles you choose the classic storage engine (not available in 3.7 and later), rocksdb will choose the storage engine based on RocksDB. The default choice is rocksdb from version 3.4 on.

ArangoDB uses the volume /var/lib/arangodb3 as database directory to store the collection data and the volume /var/lib/arangodb3-apps as apps directory to store any extensions. These directories are marked as docker volumes.

See docker inspect --format "{{ .Config.Volumes}}" arangodb for all volumes.

A good explanation about persistence and docker container can be found here: Docker In-depth: Volumes, Why Docker Data Containers are Good

Using host directories

You can map the container's volumes to a directory on the host, so that the data is kept between runs of the container. This path /tmp/arangodb is in general not the correct place to store you persistent files - it is just an example!

console
unix> mkdir /tmp/arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d \
          -v /tmp/arangodb:/var/lib/arangodb3 \
          arangodb

This will use the /tmp/arangodb directory of the host as database directory for ArangoDB inside the container.

Using a data container

Alternatively you can create a container holding the data.

console
unix> docker create --name arangodb-persist arangodb true

And use this data container in your ArangoDB container.

console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --volumes-from arangodb-persist -p 8529:8529 arangodb

If want to save a few bytes you can alternatively use busybox or alpine for creating the volume only containers. Please note that you need to provide the used volumes in this case. For example

console
unix> docker run -d --name arangodb-persist -v /var/lib/arangodb3 busybox true

Using as a base image

If you are using the image as a base image please make sure to wrap any CMD in the exec form. Otherwise the default entrypoint will not do its bootstrapping work.

When deriving the image, you can control the instantiation via putting files into /docker-entrypoint-initdb.d/.

  • *.sh - files ending with .sh will be run as a bash shellscript.
  • *.js - files will be executed with arangosh. You can specify additional arangosh arguments via the ARANGOSH_ARGS environment variable.
  • dumps/ - in this directory you can place subdirectories containing database dumps generated using arangodump. They can be restored using arangorestore.

License

ArangoDB itself is licensed under the Apache License, but it contains software of third parties under their respective licenses.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's arangodb/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: archlinux/README.md

Quick reference

Quick reference (cont.)

What is Arch Linux?

Arch Linux, is a lightweight and flexible Linuxยฎ distribution that tries to Keep It Simple.

Currently, we have official packages optimized for the x86-64 architecture. We complement our official package sets with a community-operated package repository that grows in size and quality each and every day.

Our strong community is diverse and helpful, and we pride ourselves on the range of skill sets and uses for Arch that stem from it. Please check out our forums and mailing lists to get your feet wet. Also glance through our wiki if you want to learn more about Arch.

About this image

The root filesystem tarball for this image is auto-generated weekly at 00:00 UTC on Sunday in Arch Linux infrastructure. Given the rolling-release nature of Arch Linux, images are tagged with the included package group / meta package and the timestamp of the date they were generated. For example, archlinux:base-20201101.0.7893 was generated the First of November 2020 in CI job #7893. The latest tag will always match the latest base tag.

Besides base we also provide images for the base-devel package group.

This image is intended to serve the following goals:

  • Provide the Arch experience in a Docker Image
  • Provide simplest but complete image to base every other upon
  • pacman needs to work out of the box
  • All installed packages have to be kept unmodified

Availability

Root filesystem tarballs are provided by our GitLab for at least a year.

Updating

Arch Linux is a rolling release distribution, so a full update is recommended when installing new packages. In other words, we suggest to either execute RUN pacman -Syu immediately after your FROM statement or as soon as you docker run into a container.

How It's Made

You can build this image with the tools on the Arch Linux GitLab repository using the included makefile.

License

The Docker image creation scripts contained under the repository archlinux are licensed under GPLv3. All the licensing information for the packages contained in it can be found under /usr/share/licenses/ inside of the image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's archlinux/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: backdrop/README.md

Quick reference

Quick reference (cont.)

What is Backdrop CMS?

Backdrop CMS is a comprehensive Content Management System for small to medium sized businesses and non-profits. It is a fork of the Drupal project.

Backdrop CMS enables people to build highly customized websites, affordably, through collaboration and open source software. For more on the Backdrop's philosophy see https://backdropcms.org/philosophy.

How to use this image

The basic pattern for starting a backdrop instance is:

console
$ docker run --name some-backdrop --link some-mysql:mysql -d backdrop

The following environment variables are also honored for configuring your Backdrop CMS instance:

  • -e BACKDROP_DB_HOST=... (defaults to the IP and port of the linked mysql container)
  • -e BACKDROP_DB_USER=... (defaults to "root")
  • -e BACKDROP_DB_PASSWORD=... (defaults to the value of the MYSQL_ROOT_PASSWORD environment variable from the linked mysql container)
  • -e BACKDROP_DB_NAME=... (defaults to "backdrop")
  • -e BACKDROP_DB_PORT=... (defaults to 3306)
  • -e BACKDROP_DB_DRIVER=... (defaults to "mysql")

The BACKDROP_DB_NAME must already exist on the given MySQL server. Check out the official mysql image for more info on spinning up a DB.

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

console
$ docker run --name some-backdrop --link some-mysql:mysql -p 8080:80 -d backdrop

Then, access it via http://localhost:8080 or http://host-ip:8080 in a browser.

If you'd like to use an external database instead of a linked mysql container, specify the hostname and port with BACKDROP_DB_HOST/BACKDROP_DB_PORT along with the password in BACKDROP_DB_PASSWORD and the username in BACKDROP_DB_USER (if it is something other than root):

console
$ docker run --name some-backdrop \
  -e BACKDROP_DB_HOST=10.1.2.3 \
  -e BACKDROP_DB_PORT=10432 \
  -e BACKDROP_DB_USER=... \
  -e BACKDROP_DB_PASSWORD=... \
  -d backdrop

... via [`docker-compose`](https://github.com/docker/compose)

Example docker-compose.yml for backdrop:

yaml
backdrop:
  image: backdrop
  links:
    - db:mysql
  ports:
    - 8080:80

db:
  image: mysql
  environment:
    MYSQL_USER: backdrop
    MYSQL_PASSWORD: backdrop
    MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    MYSQL_DATABASE: backdrop

Run docker-compose up, wait for it to initialize completely, and visit http://localhost:8080 or http://host-ip:8080.

Adding additional libraries / extensions

This image does not provide any additional PHP extensions or other libraries, even if they are required by popular plugins. There are an infinite number of possible plugins, and they potentially require any extension PHP supports. Including every PHP extension that exists would dramatically increase the image size.

If you need additional PHP extensions, you'll need to create your own image FROM this one. The documentation of the php image explains how to compile additional extensions. Additionally, the drupal:7 Dockerfile has an example of doing this.

The following Docker Hub features can help with the task of keeping your dependent images up-to-date:

  • Automated Builds let Docker Hub automatically build your Dockerfile each time you push changes to it.

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's backdrop/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: bash/README.md

Quick reference

Quick reference (cont.)

What is Bash?

Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features.

tiswww.case.edu/php/chet/bash/bashtop.html

How to use this image

The primary use cases this image is targeting are testing new features of more recent Bash versions before your primary distribution updates packages and testing shell scripts against different Bash versions to ensure compatibility. There are likely other interesting use cases as well, but those are the primary two the image was initially created to solve!

Notes

There are a few main things that are important to note regarding this image:

  1. Bash itself is installed at /usr/local/bin/bash, not /bin/bash, so the recommended shebang is #!/usr/bin/env bash, not #!/bin/bash (or explicitly running your script via bash /.../script.sh instead of letting the shebang invoke Bash automatically). The image does not include /bin/bash, but if it is installed via the package manager included in the image, that package will install to /bin/bash and might cause confusion (although /usr/local/bin is ahead of /bin in $PATH, so as long as plain bash or /usr/bin/env are used consistently, the image-provided Bash will be preferred).

  2. Bash is the only thing included, so if your scripts rely on external tools (such as jq, for example), those will need to be added manually (via apk add --no-cache jq, for example).

Interactive shell

console
$ docker run -it --rm bash:4.4
bash-4.4# which bash
/usr/local/bin/bash
bash-4.4# echo $BASH_VERSION
4.4.0(1)-release

Testing scripts via bind-mount

console
$ docker run -it --rm -v /path/to/script.sh:/script.sh:ro bash:4.4 bash /script.sh
...
$ docker run -it --rm -v /path/to/script.sh:/script.sh:ro bash:3.2 bash /script.sh
...

Testing scripts via `Dockerfile`

dockerfile
FROM bash:4.4

COPY script.sh /

CMD ["bash", "/script.sh"]

Then, build and run the Docker image:

console
$ docker build -t my-bash-app .
...
$ docker run -it --rm --name my-running-app my-bash-app
...

License

Bash is free software, distributed under the terms of the GNU General Public License, version 3.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's bash/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


File: bonita/README.md

Quick reference

Quick reference (cont.)

What is Bonita?

Bonita (called Bonita BPM till 7.5) is an open-source business process management and workflow suite created in 2001. It was started in France National Institute for Research in Computer Science, and then had incubated several years inside of the French computer science company Groupe Bull. Since 2009, the development of Bonita is supported by a company dedicated to this activity: Bonitasoft.

wikipedia.org/wiki/Bonita_BPM

How to use this image

Quick start

console
$ docker run --name bonita -d -p 8080:8080 bonita

This will start a container running Bonita runtime: a Tomcat bundle with Bonita Engine + Bonita Portal. With no environment variables specified, it's as if you have launched the bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). Bonita uses a H2 database here.

You can access the Bonita Portal on http://localhost:8080/bonita and login using the default credentials: install / install

PostgreSQL

PostgreSQL is the recommended database.

Set max_prepared_transactions to 100:

console
$ mkdir -p custom_postgres
$ echo '#!/bin/bash' > custom_postgres/bonita.sh
$ echo 'sed -i "s/^.*max_prepared_transactions\s*=\s*\(.*\)$/max_prepared_transactions = 100/" "$PGDATA"/postgresql.conf' >> custom_postgres/bonita.sh
$ chmod +x custom_postgres/bonita.sh

Mount that directory location as /docker-entrypoint-initdb.d inside the PostgreSQL container:

console
$ docker run --name mydbpostgres -v "$PWD"/custom_postgres/:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=mysecretpassword -d postgres:11

See the official PostgreSQL documentation for more details.

console
$ docker run --name bonita_postgres --link mydbpostgres:postgres -d -p 8080:8080 bonita

MySQL

There are known issues with the management of XA transactions by MySQL engine and driver: see MySQL bug 17343

Increase the packet size which is set by default to 1M:

console
$ mkdir -p custom_mysql
$ echo "[mysqld]" > custom_mysql/bonita.cnf
$ echo "max_allowed_packet=16M" >> custom_mysql/bonita.cnf

Mount that directory location as /etc/mysql/conf.d inside the MySQL container:

console
$ docker run --name mydbmysql -v "$PWD"/custom_mysql/:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql:8.0

See the official MySQL documentation for more details.

Start your application container to link it to the MySQL container:

console
$ docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 bonita

Modify default credentials

console
$ docker run --name=bonita -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 bonita

Now you can access the Bonita Portal on localhost:8080/bonita and login using: tech_user / secret

... via [`docker stack deploy`](https://docs.docker.com/engine/reference/commandline/stack_deploy/) or [`docker-compose`](https://github.com/docker/compose)

Example stack.yml for bonita:

yaml
# Use tech_user/secret as user/password credentials
version: '3'

services:
  db:
    image: postgres:11
    environment:
      POSTGRES_PASSWORD: example
    restart: always
    command:
      - -c
      - max_prepared_transactions=100
  bonita:
    image: bonita
    ports:
      - 8080:8080
    environment:
      - POSTGRES_ENV_POSTGRES_PASSWORD=example
      - DB_VENDOR=postgres
      - DB_HOST=db
      - TENANT_LOGIN=tech_user
      - TENANT_PASSWORD=secret
      - PLATFORM_LOGIN=pfadmin
      - PLATFORM_PASSWORD=pfsecret
    restart: on-failure:2
    depends_on:
      - db
    entrypoint:
      - bash
      - -c
      - |
        set -e
        echo 'Waiting for Postgres to be available'
        export PGPASSWORD="$$POSTGRES_ENV_POSTGRES_PASSWORD"
        maxTries=10
        while [ "$$maxTries" -gt 0 ] && ! psql -h "$$DB_HOST" -U 'postgres' -c '\l'; do
            let maxTries--
            sleep 1
        done
        echo
        if [ "$$maxTries" -le 0 ]; then
            echo >&2 'error: unable to contact Postgres after 10 tries'
            exit 1
        fi
        exec /opt/files/startup.sh

Run docker stack deploy -c stack.yml bonita (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080, or http://host-ip:8080 (as appropriate).

Where to store data

Most of the data are stored in a database and can be stored outside the Bonita container as described above using the PostgreSQL or MySQL container. However, some data remains inside the Bonita bundle. Bonita Home is a folder, called bonita, which contains configuration, working, and temporary folders and files. There are also log files inside the logs folder till Bonita 7.8.

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the bonita images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your data by writing the files to disk on the host system using its own internal volume management. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/datadir.

  2. Start your bonita container like this:

    docker run --name some-bonita -v /my/own/datadir:/opt/bonita -d -p 8080:8080 bonita:tag

The -v /my/own/datadir:/opt/bonita part of the command mounts the /my/own/datadir directory from the underlying host system as /opt/bonita inside the container, where Bonita will deploy the bundle and write data files by default.

Migrate from an earlier version of Bonita

  • Stop the container to perform a backup

    console
    $ docker stop bonita_7.9.5_postgres
  • For containers < 7.3.0 :

    • Check where your data are stored
    text
    ```console
    $ docker inspect bonita_7.2.3_postgres
    [...]
        "Mounts": [
            {
                "Source": "/home/user/Documents/Docker/Volumes/bonita_7.2.3_postgres",
                "Destination": "/opt/bonita",
                "Mode": "",
                "RW": true
            }
        ],
    [...]
    ```
    • Copy data from the filesystem
    text
    ```console
    $ cp -r bonita_7.2.3_postgres bonita_migration
    ```
  • Retrieve the DB container IP

    console
    $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' mydbpostgres
    172.17.0.26
  • Dump the database

    console
    $ export PGPASSWORD=mysecretpassword
    $ pg_dump -O -x -h 172.17.0.26 -U postgres bonitadb > /tmp/bonitadb.sql

    Note that businessdb won't be updated with the migration tool but you may want to also backup/move it.

  • Load the dump

    console
    $ export PGPASSWORD=mysecretpassword
    $ psql -U postgres -h 172.17.0.26 -d postgres -c "CREATE USER newbonitauser WITH PASSWORD 'newbonitapass';"
    $ psql -U postgres -h 172.17.0.26 -d postgres -c "CREATE DATABASE newbonitadb OWNER newbonitauser;"
    $ export PGPASSWORD=newbonitapass
    $ cat /tmp/bonitadb.sql | psql -U newbonitauser -h 172.17.0.26 newbonitadb
  • Retrieve the last migration tool

    • If you migrate to a version < 7.3.0
    text
    -    get also the target version of the Bonita bundle
    
    ```console
    cd bonita_migration
    wget https://github.com/bonitasoft/bonita-platform-releases/releases/download/7.11.4/bonita-migration-distrib-2.53.0.zip
    wget https://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.2.4-Tomcat-7.0.67.zip
    unzip bonita-migration-distrib-2.53.0.zip
    unzip BonitaBPMCommunity-7.2.4-Tomcat-7.0.67.zip
    ```
    
    -    Move the previous Home into the new bundle
    
    ```console
    mv BonitaBPMCommunity-7.2.4-Tomcat-7.0.67/bonita/ BonitaBPMCommunity-7.2.4-Tomcat-7.0.67/bonita.orig
    cp -r BonitaBPMCommunity-7.2.3-Tomcat-7.0.67/bonita/ BonitaBPMCommunity-7.2.4-Tomcat-7.0.67/bonita/
    ```
    • If you migrate to a version >= 7.3.0
    text
    ```console
    cd bonita_migration
    wget https://github.com/bonitasoft/bonita-platform-releases/releases/download/7.11.4/bonita-migration-distrib-2.53.0.zip
    unzip bonita-migration-distrib-2.53.0.zip
    ```
  • Configure the migration tool

    console
    $ cd bonita-migration-distrib-2.53.0

    edit the migration tool config to point towards the copy of bonita home and db

    console
    $ vim Config.properties

    For example :

    text
    db.vendor=postgres
    db.url=jdbc:postgresql://172.17.0.26:5432/newbonitadb
    db.driverClass=org.postgresql.Driver
    db.user=newbonitauser
    db.password=newbonitapass
    # location of the bonita home (only useful when migration from version before 7.3.0)
    bonita.home=/home/user/Documents/Docker/Volumes/bonita_migration/BonitaBPMCommunity-7.2.3-Tomcat-7.0.67/bonita
  • Launch the migration

    console
    $ cd bin
    $ ./bonita-migration-distrib
  • Launch the new container pointing towards the copy of DB and filesystem

    • If < 7.3.0
    console
    $ docker run --name=bonita_7.2.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v "$PWD"/bonita_migration:/opt/bonita/ -d -p 8081:8080 bonita:7.2.4
    • If >= 7.3.0
    console
    $ docker run --name=bonita_7.11.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 bonita:7.11.4
  • Reapply specific configuration if needed, for example with a version >= 7.3.0 :

    console
    $ docker exec -ti bonita_7.11.4_postgres /bin/bash
    console
    $ cd /opt/bonita/BonitaCommunity-7.11.4/setup
    $ ./setup.sh pull
    $ TENANT_LOGIN=tech_user
    $ TENANT_PASSWORD=secret
    $ PLATFORM_LOGIN=pfadmin
    $ PLATFORM_PASSWORD=pfsecret
    $ sed -e 's/^#userName\s*=.*/'"userName=${TENANT_LOGIN}"'/' \
          -e 's/^#userPassword\s*=.*/'"userPassword=${TENANT_PASSWORD}"'/' \
          -i platform_conf/current/tenants/1/tenant_engine/bonita-tenant-community-custom.properties
    $ sed -e 's/^platform.tenant.default.username\s*=.*/'"platform.tenant.default.username=${TENANT_LOGIN}"'/' \
          -e 's/^platform.tenant.default.password\s*=.*/'"platform.tenant.default.password=${TENANT_PASSWORD}"'/' \
          -i platform_conf/current/platform_portal/platform-tenant-config.properties
    $ sed -e 's/^#platformAdminUsername\s*=.*/'"platformAdminUsername=${PLATFORM_LOGIN}"'/' \
          -e 's/^#platformAdminPassword\s*=.*/'"platformAdminPassword=${PLATFORM_PASSWORD}"'/' \
          -i platform_conf/current/platform_engine/bonita-platform-community-custom.properties
    $ sed -i -e 's/^#GET|/GET|/' -e 's/^#POST|/POST|/' -e 's/^#PUT|/PUT|/' -e 's/^#DELETE|/DELETE|/' -i platform_conf/current/tenants/1/tenant_portal/dynamic-permissions-checks.properties
    $ ./setup.sh push
    console
    $ docker restart bonita_7.11.4_postgres
  • Specific consideration regarding migration to Java 11 in Bonita 7.9

    Bonita 7.9 docker image runs with Java 11. If you are migrating from an earlier version which runs Java 8, you should validate on a test environment that your custom code is compatible. Aside from just code incompatibility, special attention has to be given to the dependencies of the custom code, as they might not work in Java 11.

For more details regarding Bonita migration, see the documentation.

Security

This Docker image activates both static and dynamic authorization checks by default on REST API. To be consistent, it also deactivates the HTTP API.

For specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false:

console
$ docker run  -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita

Environment variables

When you start the bonita image, you can adjust the configuration of the Bonita instance by passing one or more environment variables on the docker run command line.

`PLATFORM_PASSWORD`

This environment variable is recommended for you to use the Bonita image. It sets the platform administrator password for Bonita. If it is not specified, the default password platform will be used.

`PLATFORM_LOGIN`

This optional environment variable is used in conjunction with PLATFORM_PASSWORD to define the username for the platform administrator. If it is not specified, the default user platformAdmin will be used.

`TENANT_PASSWORD`

This environment variable is recommended for you to use the Bonita image. It sets the tenant administrator password for Bonita. If it is not specified, the default password install will be used.

`TENANT_LOGIN`

This optional environment variable is used in conjunction with TENANT_PASSWORD to define the username for the tenant administrator. If it is not specified, the default user of install will be used.

`REST_API_DYN_AUTH_CHECKS`

This optional environment variable is used to enable/disable dynamic authorization checking on Bonita REST API. The default value is true, which will activate dynamic authorization checking.

`HTTP_API`

This optional environment variable is used to enable/disable the Bonita HTTP API. The default value is false, which will deactivate the HTTP API.

`JAVA_OPTS`

This optional environment variable is used to customize JAVA_OPTS. The default value is -Xms1024m -Xmx1024m -XX:MaxPermSize=256m.

`ENSURE_DB_CHECK_AND_CREATION`

This optional environment variable is used to allow/disallow the SQL queries to automatically check and create the databases using the database administrator credentials. The default value is true.

`DB_VENDOR`

This environment variable is automatically set to postgres or mysql if the Bonita container is linked to a PostgreSQL or MySQL database using --link. The default value is h2. It can be overridden if you don't use the --link capability.

`DB_HOST`, `DB_PORT`

These variables are optional, used in conjunction to configure the bonita image to reach the database instance. There are automatically set if --link is used to run the container.

`DB_NAME`, `DB_USER`, `DB_PASS`

These variables are used in conjunction to create a new user, set that user's password, and create the bonita database.

DB_NAME default value is bonitadb.

DB_USER default value is bonitauser.

DB_PASS default value is bonitapass.

`BIZ_DB_NAME`, `BIZ_DB_USER`, `BIZ_DB_PASS`

These variables are used in conjunction to create a new user, set that user's password and create the bonita business database.

BIZ_DB_NAME default value is businessdb.

BIZ_DB_USER default value is businessuser.

BIZ_DB_PASS default value is businesspass.

`DB_ADMIN_USER`, `DB_ADMIN_PASS`

These variables are optional, and used in conjunction to create users and databases through the administrator account used on the database instance.

DB_ADMIN_USER if no value is provided, this is automatically set to root with MySQL or postgres with PostgreSQL.

DB_ADMIN_PASS if no value is provided, this is automatically set using the value from the linked container: MYSQL_ENV_MYSQL_ROOT_PASSWORD or POSTGRES_ENV_POSTGRES_PASSWORD.

`DB_DROP_EXISTING`, `BIZ_DB_DROP_EXISTING`

DB_DROP_EXISTING and BIZ_DB_DROP_EXISTING can be used to drop existing databases in order to reuse an existing database instance.

DB_DROP_EXISTING default value is N.

BIZ_DB_DROP_EXISTING default value is N.

`BONITA_SERVER_LOGGING_FILE`, `BONITA_SETUP_LOGGING_FILE`

Since Bonita 7.9 BONITA_SERVER_LOGGING_FILE and BONITA_SETUP_LOGGING_FILE can be used to update logging configuration.

BONITA_SERVER_LOGGING_FILE default value is /opt/bonita/BonitaSubscription-${BONITA_VERSION}/server/conf/logging.properties.

BONITA_SETUP_LOGGING_FILE default value is /opt/bonita/BonitaSubscription-${BONITA_VERSION}/setup/logback.xml.

How to extend this image

If you would like to do additional initialization, you can add a *.sh script under /opt/custom-init.d. The startup.sh file will source any *.sh script found in this directory to do further initialization before starting the service.

For example, you can increase the log level :

console
$ mkdir -p custom_bonita
$ echo '#!/bin/bash' > custom_bonita/bonita.sh
$ echo 'sed -i "s/^org.bonitasoft.level = WARNING$/org.bonitasoft.level = FINEST/" /opt/bonita/BonitaCommunity-7.11.4/server/conf/logging.properties' >> custom_bonita/bonita.sh
$ chmod +x custom_bonita/bonita.sh

$ docker run --name bonita_custom -v "$PWD"/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita

Since Bonita 7.9 you can also apply a custom logging.properties file like this :

console
docker run --name bonita \
  -v /path/to/logging.properties:/etc/logging.properties -e BONITA_SERVER_LOGGING_FILE=/etc/logging.properties \
  -d -p 8080:8080 bonita

Note: There are several ways to check the bonita logs. Till Bonita 7.8, one of them is

console
$ docker exec -ti bonita_custom /bin/bash
tail -f /opt/bonita/BonitaCommunity-7.11.4/server/logs/bonita.`date +%Y-%m-%d`.log

Since Bonita 7.9 bonita logs are redirected towards standard output and directly accessible using

console
$ docker logs -f bonita

License

Bonita image includes two parts :

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's bonita/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.