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.Documentation Index
Fetch the complete documentation index at: https://docs.minimus.io/llms.txt
Use this file to discover all available pages before exploring further.
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:whoami to confirm that you are running as root:
Dockerfile example
The following example shows how to utilize the package manager during the build process with Dockerfile. Authentication to the MinimOS package repo is required:- The first example uses hardcoded credentials for the sake of simplicity. This should only be used in a demo or basic testing environment.
- The second example offers a secure method for passing build secrets to Dockerfile. Refer to Docker documentation to learn more about build secrets
Exposed build arguments
This Dockerfile illustrates how to utilize the package manager during the build process. The credentials are hardcoded:Protect build secrets
As a best practice, pass credentials to the MinimOS package repo using a credentials file.-
Create a text file to store the credentials, for example
repo_credentials.txt. Add the repo user and repo password as key values in the following format: -
In the Dockerfile, use the flag
--mount=type=secretand reference the fileid=repo_credentials.txt: -
When you build the image, reference the credentials file. Note that the period
.specifies the current directory as the build context: -
Run the image as usual. For example:
docker run redis-with-nginx-test.Please note that this example utilizes the default NGINX setup. Additional NGINX configurations are needed for a usable app.