DUE(1) | Dedicated User Environment | DUE(1) |
due - Dedicated User Environment. A build environment for your build environments.
due [-r|–run args] [dedication]
due [ –create args ] [dedication]
due [ –delete term ] [dedication]
due [-m|–manage args] [dedication]
due [-v|–version]
due [-h|–help]
DUE is a set of wrapper scripts for both creating Docker container based build environments, and running them with intelligent defaults so that the user can feel like they are still on the host system.
Key features include:
1 - Creating an account in the container for the user at run time and mounting the user’s home/work directory so configuration files are available.
2 - List based browsing of images to run and active containers to log in to.
3 - Use of container `templates' to pre configure and build containers for a particular target or Debian based operating system, eliminating errors caused by missing dependencies, or misconfiguration.
4 - Commands can be run using the container without having to log into it, allowing for use in automated build environments.
5 - Compatibility with both Docker and Podman for running containers.
Each of these options has context specific help and sub commands
These options are available after the –run argument, and relate to starting and logging in to containers.
When accessing the container, do not attempt to create a user
Example: look at /proc and the password file in a container: ./due –run –command “ls -lrt /proc” ; “cat /etc/passwd”
These options are accessed after the –create argument, and, predictably enough, relate to creating new images.
Containers created by DUE will always have files from ./templates/common-templates in every image. The primary example of this is the container-create-user.sh script that sets up an account for the user in the container, and allows commands to be run in the container as if it was the user invoking them.
The order of creation is as follows, using the debian-package template as an example, where the resulting image will be named `debian-package-10'
1 - The contents of common-templates are copied to a debian-package-10-template-merge directory under ./due-build-merge/
2 - The contents of the debian-package template directory copied in to the debian-package-10-template-merge directory and will overwrite any files with identical names.
3 - Any REPLACE_ fields in the template files are replaced with values supplied from the command line (such as the starting container image) and all files are copied to ./due-build-merge/debian-package-10
4 - The ./due-build-merge/debian-package-10/Dockerfile.create file is used to create the image from this build directory.
Quick image changes can be made by editing the build directory ( ./due-build-merge/debian-package-10 ) and re running ./due –create –build-dir ./due-build-merge/debian-package-10
The final image will hold a /due-configuration directory, which holds everything that went into the image. This is very useful for install script debug inside the container.
A list of available default configurations is provided by running: due –create –help This will parse the README.md files under the ./templates directory looking for specific strings. This output can be filtered by using wildcard syntax as follows: due –create –help –filter
DUE 3.0.0 introduced hierarchical template parsing, where a template could be a combination of files provided by `sub-type' directories, to reduce file duplication. With this, files with identical names and paths will overwrite the ones provided by higher directories.
Example: Given directory structure: due/templates/foo/sub-type/bar/sub-type/baz
Image creation using the `baz' template will be: 1 - files from templates/common-templates 2 - plus files from foo overwriting any files with the same relative path from common-templates 3 - plus files from bar overwriting foo files the same way 4 - plus files from baz overwriting bar files the same way.
While not normally needed, this may be useful for supporting a number of Images with minor but important differences. See templates/README.md for more information.
1 - Configure an image build directory under due-build-merge named from –name Mandatory:
Optional:
2 - Build a Docker image from the image build directory.
These options are accessed after the –manage argument, and can make working with containers/images easier.
The configuration file sets up the following variables:
DUE_ENV_DEFAULT_HOMEDIR - evaled to define the user’s home directory. This can be useful if there is a naming convention for work directories on shared systems, or your home directory is an NFS mount (which can create
strange behavior when mounted in Docker) or you need to use a bigger build directory.
DUE_USER_CONTAINER_LIMIT - limit the number of containers a user is allowed to run. Handy on a shared system to remind people of what they have running. This can easily be circumvented, though.
See GitHub Issues: [https://github.com/[CumulusNetworks]/[DUE]/issues]
Alex Doyle <adoyle@nvidia.com>
SPDX-License-Identifier: MIT
Copyright (c) 2021 Nivia Corporation.
Copyright (c) 2019,2020 Cumulus Networks, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
due.conf(4)
Version 3.0.0 |