Adding Packages to Minimus Images
How to extend a Minimus container image with packages from the MinimOS package repo
Customize Minimus images by adding packages from the MinimOS package repo. This process requires repo credentials in addition to the usual Minimus image pull token. If you need access to repo credentials, please contact your account team.
Note that this is only relevant if you need to add arbitrary packages to images that do not normally include them. Minimus images already include a complete (but minimal) set of packages required to run a given app. However, in your environment you may wish to add some additional package not normally included in the Minimus image. For example, you may wish to add a monitoring tool to the Minimus nginx image. Minimus can create this image and maintain it for you in your private image gallery or you can use this article to create and maintain this image yourself.
Shell example
In the following example, we will add an nginx package to the Minimus Redis image.
To begin, run the dev version of the image so that you have a shell included. You need to run the container as root and override the entrypoint to start up in a shell:
Run whoami
to confirm that you are running as root:
Provide the MinimOS package repository URL as a package source. Your Minimus account team will provide the repo user and password credentials.
Check for updates:
You should see a confirmation with the number of packages found:
Add the nginx package from MinimOS:
You should see the installation messages specifying the package version and dependencies, for example:
Dockerfile example
As a first step, login to the Minimus registry using your Minimus token:
Here’s an example Dockerfile illustrating how to utilize the package manager during the build process:
When you build the app, you will need to pass the repository username & password as build arguments: