unregistry Documentation

Push docker images directly to remote servers without an external registry

4,744 stars Go Go 1 file ยท ~26,533 tokens #containerd#docker#golang#kubernetes#oci#registry
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy unregistry on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name unregistry -p 5000:5000 --restart always psviderski/unregistry:latest

1. Project Overview & Quickstart (psviderski/unregistry)

Unregistry is a lightweight container image registry that stores and serves images directly from your Docker daemon's
storage.

The included docker pussh command (extra 's' for SSH) lets you push images straight to remote Docker servers over SSH.
It transfers only the missing layers, making it fast and efficient.

https://github.com/user-attachments/assets/9d704b87-8e0d-4c8a-9544-17d4c63bd050

The problem

You've built a Docker image locally. Now you need it on your server. Your options suck:

  • Docker Hub / GitHub Container Registry - Your code is now public, or you're paying for private repos
  • Self-hosted registry - Another service to maintain, secure, and pay for storage
  • Save/Load - docker save | ssh <remote server> docker load transfers the entire image, even if 90% already exists
    on the server
  • Rebuild remotely - Wastes time and server resources. Plus now you're debugging why the build fails in production

You just want to move an image from A to B. Why is this so hard?

The solution

shell
docker pussh myapp:latest user@server

That's it. Your image is on the remote server. No registry setup, no subscription, no intermediate storage, no exposed
ports. Just a direct transfer of the missing layers over SSH.

Here's what happens under the hood:

  1. Establishes SSH tunnel to the remote server
  2. Starts a temporary unregistry container on the server
  3. Forwards a random localhost port to the unregistry port over the tunnel
  4. docker push to unregistry through the forwarded port, transferring only the layers that don't already exist
    remotely. The transferred image is instantly available on the remote Docker daemon
  5. Stops the unregistry container and closes the SSH tunnel

It's like rsync for Docker images โ€” simple and efficient.

[!NOTE]
Unregistry was created for Uncloud, a lightweight tool for deploying
containers across multiple Docker hosts. We needed something simpler than a full registry but more efficient than
save/load.

Requirements

On local machine

  • Docker CLI with plugin support (Docker 19.03+)
  • OpenSSH client

On remote server

  • Docker is installed and running
  • SSH user has permissions to run docker commands (user is root or non-root user is in docker group โ€” see
    Manage Docker as a non-root user
    for details)
  • If sudo is required, ensure the user can run sudo docker without a password prompt
  • Your server has internet access to ghcr.io to pull the unregistry image
    ghcr.io/psviderski/unregistry:latest on first docker pussh use.
    • If your server requires a proxy to access the internet, configure Docker to use it by following the
      Daemon proxy configuration guide.
    • For air-gapped environments or where the access to ghcr.io is restricted, you can preload the
      image manually:
      shell
      # Get the needed unregistry image version from the plugin version output
      docker pussh --version
      # Will return:
      #   ...
      #   unregistry image: ghcr.io/psviderski/unregistry:X.Y.Z
      
      # On a machine with internet access
      docker pull ghcr.io/psviderski/unregistry:X.Y.Z
      docker save ghcr.io/psviderski/unregistry:X.Y.Z | ssh user@server docker load
  • Unregistry container requires access to the containerd socket at /run/containerd/containerd.sock, so the container
    runs as root to have the necessary permissions

Installation

macOS/Linux via Homebrew

shell
brew install psviderski/tap/docker-pussh

After installation, to use docker-pussh as a Docker CLI plugin (docker pussh command) you need to create a symlink:

shell
mkdir -p ~/.docker/cli-plugins
ln -sf $(brew --prefix)/bin/docker-pussh ~/.docker/cli-plugins/docker-pussh

macOS/Linux via direct download

Download the current version:

shell
mkdir -p ~/.docker/cli-plugins

# Download the script to the docker plugins directory
curl -sSL https://raw.githubusercontent.com/psviderski/unregistry/v0.4.3/docker-pussh \
  -o ~/.docker/cli-plugins/docker-pussh

# Make it executable
chmod +x ~/.docker/cli-plugins/docker-pussh

If you want to download and use the latest version from the main branch:

shell
curl -sSL https://raw.githubusercontent.com/psviderski/unregistry/main/docker-pussh \
  -o ~/.docker/cli-plugins/docker-pussh
chmod +x ~/.docker/cli-plugins/docker-pussh

Debian

Via unofficial repository packages created and maintained
at unregistry-debian by @dariogriffo

You can install unregistry the debian way by running:

sh
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list
sudo apt update
sudo apt install -y unregistry docker-pussh

or in the releases page of the repository here

Windows

Windows is not currently supported, but you can try using WSL 2
with the above Linux instructions.

Verify installation

shell
docker pussh --help

โš ๏ธ Containerd image store configuration

Unregistry stores images directly in containerd's image store, which is the underlying container runtime used by Docker.
However, by default, Docker maintains its own separate storage layer and doesn't directly use images from containerd.

When you enable containerd image store in Docker, it allows Docker
to directly use the same images that unregistry stores in containerd, eliminating duplication.

  • Images pushed through unregistry are immediately available to Docker
  • No additional storage space is used (images are stored once in containerd)
  • Faster pussh operations without the additional pull step from unregistry to the classic Docker image store

Without containerd image store (default Docker behaviour)

  • After pushing, pussh runs an additional docker pull on the remote host to pull the image from unregistry to make
    it available to Docker
  • Images are stored twice: once in containerd (by unregistry) and once in the classic Docker image store
  • These unmanaged images in containerd can fill up disk space over time. To manage them manually, use:
    shell
    sudo ctr -n moby images ls
    sudo ctr -n moby images rm

How to enable containerd image store

Please refer to the official Docker documentation:
Enable containerd image store on Docker Engine.

[!WARNING]
Switching to containerd image store causes you to temporarily lose images and containers created using the classic
storage driver. Those resources still exist on your filesystem, and you can retrieve them by turning off the
containerd image store feature.

Usage

Push an image to a remote server. Please make sure the SSH user has permissions to run docker commands (user is
root or non-root user is in docker group). If sudo is required, ensure the user can run sudo docker without a
password prompt.

shell
docker pussh myapp:latest [email protected]

With SSH key authentication if the private key is not added to your SSH agent:

shell
docker pussh myapp:latest [email protected] -i ~/.ssh/id_rsa

Using a custom SSH port:

shell
docker pussh myapp:latest user@server:2222

Using a custom SSH config file:

shell
docker pussh myapp:latest prod-server -F ~/.ssh/config.prod

Push a specific platform for a multi-platform image. The local Docker has to use
containerd image store to support multi-platform images.

shell
docker pussh myapp:latest user@server --platform linux/amd64

Use a specific unregistry image version on the remote host:

shell
UNREGISTRY_IMAGE=ghcr.io/psviderski/unregistry:A.B.C docker pussh myapp:latest [email protected]

Use cases

Deploy to production servers

Build locally and push directly to your production servers. No middleman.

shell
docker build --platform linux/amd64 -t myapp:1.2.3 .
docker pussh myapp:1.2.3 deploy@prod-server
ssh deploy@prod-server docker run -d myapp:1.2.3

CI/CD pipelines

Skip the registry complexity in your pipelines. Build and push directly to deployment targets.

yaml
- name: Build and deploy
  run: |
    docker build -t myapp:${{ github.sha }} .
    docker pussh myapp:${{ github.sha }} deploy@staging-server

Homelab and air-gapped environments

Distribute images in isolated networks that can't access public registries over the internet.

Advanced usage

Running unregistry standalone

Sometimes you want a local registry without the overhead. Unregistry works great for this:

shell
# Run unregistry locally and expose it on port 5000
docker run -d -p 5000:5000 --name unregistry \
  -v /run/containerd/containerd.sock:/run/containerd/containerd.sock \
  ghcr.io/psviderski/unregistry

# Use it like any registry
docker tag myapp:latest localhost:5000/myapp:latest
docker push localhost:5000/myapp:latest

Custom SSH options

Need custom SSH settings? Use the standard SSH config file, or pass a specific config with -F:

shell
# ~/.ssh/config
Host prod-server
    HostName server.example.com
    User deploy
    Port 2222
    IdentityFile ~/.ssh/deploy_key

# Now just use
docker pussh myapp:latest prod-server

# Or use an alternate config file
docker pussh myapp:latest prod-server -F ~/.ssh/config.prod

Third-party projects

Contributing

Found a bug or have a feature idea? We'd love your help!

  • ๐Ÿ’ก Have questions, ideas, or need help?
    • Start a discussion or join an existing one in
      the Discussions.
    • Join the Uncloud Discord community where we discuss features, roadmap,
      implementation details, and help each other out.

Inspiration & acknowledgements

  • Spegel - P2P container image registry that inspired me to implement a registry
    that uses containerd image store as a backend.
  • Docker Distribution - the bulletproof Docker registry implementation
    that unregistry is based on.

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

File: README.md

What is this?

This repository contains the docs for each of the Docker official images. See docker-library/official-images for the configuration how the images are built. To see all of the official images go to the hub.

All Markdown files here are run through tianon's fork of markdownfmt (only forked to add some smaller-diff preference and minor DockerHub-compatibility changes), and verified as formatted correctly via Travis-CI.

Table of Contents

  1. What is this?
    1. Table of Contents
  2. How do I add a new image's docs
  3. How do I update an image's docs
  4. What are all these files?
    1. update.sh
    2. generate-repo-stub-readme.sh
    3. push.pl
    4. .template-helpers/generate-dockerfile-links-partial.sh
    5. .template-helpers/template.md and .template-helpers/user-feedback.md
    6. folder ``
    7. /README.md
    8. /content.md
    9. /README-short.txt
    10. /logo.png
    11. /license.md
    12. /maintainer.md
    13. /github-repo
    14. /user-feedback.md
  5. Issues and Contributing

How do I add a new image's docs

  • create a folder for my image: mkdir myimage
  • create a README-short.txt (required, 100 char max)
  • create a content.md (required)
  • create a license.md (required)
  • create a maintainer.md (required)
  • create a github-repo (required)
  • add a logo.png (recommended)

Optionally:

  • run ./markdownfmt.sh -l myimage to verify whether format of your markdown files is compliant to tianon/markdownfmt. In case you see any file names, markdownfmt detected some issues, which might result in a failed build during continuous integration. run ./markdownfmt.sh -d myimage to see a diff of changes required to pass.
  • run ./update.sh myimage to generate myimage/README.md for manual review of the generated copy.
    Note: do not actually commit the README.md file; it is automatically generated/committed before being uploaded to Docker Hub.

How do I update an image's docs

To update README.md for a specific image do not edit README.md directly. Please edit content.md or another appropriate file within the folder. To see the changes, run ./update.sh myimage from the repo root, but do not add the README.md changes to your pull request. See also markdownfmt.sh point above.

What are all these files?

`update.sh`

This is the main script used to generate the README.md files for each image. The generated file is committed along with the files used to generate it (see below on what customizations are available). Accepted arguments are which image(s) you want to update or no arguments to update all of them.

This script assumes bashbrew is in your PATH (for scraping relevant tag information from the library manifest file for each repository).

`generate-repo-stub-readme.sh`

This is used to generate a simple README.md to put in the image's repo. Argument is the name of the image, like golang and it then outputs the readme to standard out.

`push.pl`

This is used by us to push the actual content of the READMEs to the Docker Hub as special access is required to modify the Hub description contents.

This script is used by update.sh to create the "Supported tags and respective Dockerfile links" section of each generated README.md from the information in the official-images library/ manifests.

`.template-helpers/template.md` and `.template-helpers/user-feedback.md`

These files are the templates used in building the /README.md file, in combination with the individual image's files.

folder ``

This is where all the partial and generated files for a given image reside, (ex: golang/).

`/README.md`

This file is generated using update.sh.

`/content.md`

This file contains the main content of your image's long description. The basic parts you should have are a "What Is" section and a "How To" section. See the doc on Official Repos for more information on long description. The issues and contribution section is generated by the script but can be overridden. The following is a basic layout:

markdown
# What is XYZ?

// about what the contained software is

%%LOGO%%

# How to use this image

// descriptions and examples of common use cases for the image
// make use of subsections as necessary

`/README-short.txt`

This is the short description for the docker hub, limited to 100 characters in a single line.

Go (golang) is a general purpose, higher-level, imperative programming language.

`/logo.png`

Logo for the contained software. While there are not hard rules on formatting, most existing logos are square or landscape and stay within a few hundred pixels of width.

`/license.md`

This file should contain a link to the license for the main software in the image. Here is an example for golang:

markdown
View [license information](http://golang.org/LICENSE) for the software contained in this image.

`/maintainer.md`

This file should contain a link to the maintainers of the Dockerfile.

`/github-repo`

This file should contain the URL to the GitHub repository for the Dockerfiles that become the images. The file should be in a single line ending in a newline with no extraneous whitespace. Only one GitHub repo per image repository is supported. It is used in generating links. Here is an example for golang:

text
https://github.com/docker-library/golang

`/user-feedback.md`

This file is an optional override of the default user-feedback.md for those repositories with different issue and contributing policies.

Issues and Contributing

If you would like to make a new Official Image, be sure to follow the guidelines.

Feel free to make a pull request for fixes and improvements to current documentation. For questions or problems on this repo come talk to us via the #docker-library IRC channel on Freenode or open up an issue.


File: adminer/README.md

Quick reference

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)

The following drivers are not supported by this image:

  • MongoDB (The driver is not supported by PHP 7)

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: aerospike/README.md

Quick reference

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

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

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.

Documentation

This image is well documented. Check out the documentation at Viewdocs.

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: amazonlinux/README.md

Quick reference

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 LTS Candidate and Amazon Linux AMI.

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 LTS Candidate different from Amazon Linux AMI?

There are three major differences in Amazon Linux 2 LTS Candidate 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 LTS Candidate (2017.12) build an official LTS build?

No, Amazon Linux 2 (2017.12) is a first candidate LTS build of Amazon Linux 2. In the coming weeks, we will continue to engage with our customers and the broader community to get feedback before announcing an official LTS build which will be supported for 5 years. You can provide your feedback through your designated AWS representative or directly through Amazon Linux Discussion Forum.

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 LTS Candidate Container images comes with Extras included.

What is an Amazon Linux 2 LTS Candidate 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 Python 3, nginx, Postgresql, MariaDB, Go, and Rust.

How do Amazon Linux 2 LTS Candidate 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 LTS Candidate 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 LTS Candidate 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 LTS Candidate?

Available packages can be listed with the amazon-linux-extras command. Packages can be installed with the sudo amazon-linux-extras install command. Example: sudo 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 LTS Candidate, are there any changes to the existing version of Amazon Linux AMI (2017.09)?

With the availability of Amazon Linux 2, we are announcing that 2017.09 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 2017.09 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 LTS Candidate backward compatible with the existing version of Amazon Linux?

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

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.

The supported data models can be mixed in queries and allow ArangoDB to be the aggregation point for the data request you have in mind.

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 diretcly 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

In order to get a list of supported options, run

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

Persistent Data

ArangoDB supports two different storage engines as of ArangoDB 3.2. You can choose them while instantiating the container with the environment variable ARANGO_STORAGE_ENGINE. With mmfiles you choose the classic storage engine, rocksdb will choose the newly introduced storage engine based on rocksdb. The default choice is mmfiles.

ArangoDB use 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.

Please note that the old version 2.x used /var/lib/arangodb and /var/lib/arangodb-apps. We will refer to the 3.x variant in this document. In case you are starting a 2.x image just replace it with the 2.x variant.

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 will 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: backdrop/README.md

Quick reference

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.
  • Repository Links can ensure that your image is also rebuilt any time backdrop is updated.

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

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

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 the Tomcat Bundle with Bonita Engine + Bonita Portal. With no environment variables specified, it's as like 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 recommanded database.

Set max_prepared_transactions to 100:

text
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:9.3

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 bugs 17343 and 12161 for more details. Thus, using MySQL database in a production environment is not recommended.

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

text
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:5.5

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:9.3
    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.

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.

Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it:

console
$ chcon -Rt svirt_sandbox_file_t /my/own/datadir

Migrate from an earlier version of Bonita

  • Stop the container to perform a backup

    console
    $ docker stop bonita_7.2.3_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

      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

    text
    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

    text
    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://download.forge.ow2.org/bonita/bonita-migration-distrib-2.29.0.zip
    wget https://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.2.4-Tomcat-7.0.67.zip
    unzip bonita-migration-distrib-2.29.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://download.forge.ow2.org/bonita/bonita-migration-distrib-2.29.0.zip
    unzip bonita-migration-distrib-2.29.0.zip
    ```
  • Configure the migration tool

    text
    cd bonita-migration-distrib-2.29.0

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

    text
    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

    text
    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.5.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 bonita:7.5.4
  • Reapply specific configuration if needed, for example with a version >= 7.3.0 :

    console
    $ docker exec -ti bonita_7.5.4_postgres /bin/bash
    console
    $ cd /opt/bonita/BonitaCommunity-7.6.3-Tomcat-8.5.23/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.5.4_postgres

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.

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 :

text
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.6.3-Tomcat-8.5.23/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

Note: There are several ways to check the bonita logs. One of them is

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

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.


File: buildpack-deps/README.md

Quick reference

What is `buildpack-deps`?

In spirit, buildpack-deps is similar to Heroku's stack images. It includes a large number of "development header" packages needed by various things like Ruby Gems, PyPI modules, etc. For example, buildpack-deps would let you do a bundle install in an arbitrary application directory without knowing beforehand that ssl.h is required to build a dependent module.

How to use this image

This stack is designed to be the foundation of a language-stack image.

What's included?

The main tags of this image are the full batteries-included approach. With them, a majority of arbitrary gem install / npm install / pip install should be successful without additional header/development packages.

For some language stacks, that doesn't make sense, particularly if linking to arbitrary external C libraries is much less common (as in Go and Java, for example), which is where these other smaller variants can come in handy.

`curl`

This variant includes just the curl, wget, and ca-certificates packages. This is perfect for cases like the Java JRE, where downloading JARs is very common and necessary, but checking out code isn't.

`scm`

This variant is based on curl, but also adds various source control management tools. As of this writing, the current list of included tools is bzr, git, hg, and svn. Intentionally missing is cvs due to the dwindling relevance it has (sorry CVS). This image is perfect for cases like the Java JDK, where downloading JARs is very common (hence the curl base still), but checking out code also becomes more common as well (compared to the JRE).

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 buildpack-deps/ 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.