-
Notifications
You must be signed in to change notification settings - Fork 6
Home
HOME | Biocontainer Compatibility Report | Package Installation Benchmark
lpmx rootless container
Usage:
lpmx [command]
Available Commands:
destroy destroy the registered container
docker docker command
download download files from online storage
expose expose program inside container
get get settings from memcache server
help Help about any command
init init the lpmx itself
list list the containers in lpmx system
resume resume the registered container
set set environment variables for container
singularity singularity command
uninstall uninstall lpmx completely
update update dependencies
version show the version of LPMX
Flags:
-h, --help help for lpmx
Use "lpmx [command] --help" for more information about a command.
-
Download lpmx from lpmx release page, currently only the Linux x86_64 is supported. Though we can compile binaries as well as libraries for x86 architecture, our primary goal is supporting x86_64 arch.
-
chmod a+x lpmx && ./lpmx init
lpmx will automatically download its dependencies and initialize itself.
For offline initialization, please download dependency from github)
The command for offline initialization is:
"./lpmx init -d dependency_package_path"
- 'lpmx docker search ubuntu' to search available images on docker hub, here using ubuntu as an example.
- 'lpmx docker download ubuntu:14.04' to download the image from docker hub, remember to use "image:tag".
For offline users, please use 'lpmx docker commit container_id' to commit container to image, which is similar to command 'docker commit', for migration or images transmission among different machinese, use 'lpmx docker package image_name' to generate tar ball. Copy this tar ball to new machine, then use 'lpmx docker add tar_ball' to your new lpmx system.
- 'lpmx docker create ubuntu:14.04' to create container based on the already downloaded image.
And now you should be inside container.
'lpmx init' command is used for initializing the basic system folder of lpmx, it stores information of containers and other information(Users should call this command before using lpmx)
init command is the basic command of lpmx, which is used for initializing lpmx system
Usage:
lpmx init [flags]
Flags:
-d, --dependency string dependency tar ball(optional)
-h, --help help for init
-r, --reset initialize by force(optional)
- 'lpmx init' supports offline initialization with dependency tar ball, i.e, 'lpmx init -d dependency.tar.gz', initializing lpmx in offline mode.
'lpmx docker' command is our newly added command targeting support Docker images on DockerHub, by using this command, users can search, download, create and package container based on docker images.
docker command is the advanced comand of lpmx, which is used for executing docker related commands
Usage:
lpmx docker [command]
Available Commands:
add add the local docker image to system
commit commit docker container
create initialize the local docker images
delete delete the local docker images
download download the docker images from docker hub
fastrun run container in a fast way without switching into shell
list list local docker images
load load the 'docker save' generated tar ball to system
package package the docker images from docker hub for offline usage
reset reset local docker base layers
search search the docker images from docker hub
Flags:
-h, --help help for docker
Use "lpmx docker [command] --help" for more information about a command.
- 'lpmx docker add' -> add local image packaged via command 'lpmx docker package'
- 'lpmx docker commit' -> commit container to image (similar to 'docker commit')
- 'lpmx docker create' -> create contaienr based on downloaded docker images from Docker Hub
- 'lpmx docker delete' -> delete local downloaed Docker images
- 'lpmx docker download' -> download docker images from Docker Hub
- 'lpmx docker fastrun' -> create, run and destroy a container in a fast way, it is usually used for fast testing
- 'lpmx docker list' -> list all downloaded Docker images
- 'lpmx docker load' -> load the 'docker save' generated tar ball
- 'lpmx docker package' -> package local images to tar balls
- 'lpmx docker reset' -> reset downloaded images(re-extraction)
- 'lpmx docker search' -> search images on Docker Hub
(command) lpmx docker search ubuntu
(result)
Name: ubuntu, Available Tags: [10.04 12.04.5 12.04 12.10 13.04 13.10 14.04.1 14.04.2 14.04.3 14.04.4 14.04.5 14.04 14.10 15.04 15.10 16.04 16.10 17.04 17.10 18.04 18.10 19.04 ...]
(Note) result contains target name and available tags for this name. If name does not exist in docker hub, then error occurs.
(command) lpmx docker download ubuntu:16.10
(result)
Downloading file with type: application/vnd.docker.image.rootfs.diff.tar.gzip, size: 42786408, destination: /home/test/app/.docker/ubuntu/16.10/image/dca7be20e546564ad2c985dae3c8b0a259454f5637e98b59a3ca6509432ccd01 Downloading file with type: application/vnd.docker.image.rootfs.diff.tar.gzip, size: 816, destination: /home/test/app/.docker/ubuntu/16.10/image/40bca54f5968c2bdb0d8516e6c2ca4d8f181326a06ff6efee8b4f5e1a36826b8 Downloading file with type: application/vnd.docker.image.rootfs.diff.tar.gzip, size: 515, destination: /home/test/app/.docker/ubuntu/16.10/image/61464f23390e7d30cddfd10a22f27ae6f8f69cc4c1662af2c775f9d657266016 Downloading file with type: application/vnd.docker.image.rootfs.diff.tar.gzip, size: 854, destination: /home/test/app/.docker/ubuntu/16.10/image/d99f0bcd5dc8b557254a1a18c6b78866b9bf460ab1bf2c73cc6aca210408dc67 Downloading file with type: application/vnd.docker.image.rootfs.diff.tar.gzip, size: 163, destination: /home/test/app/.docker/ubuntu/16.10/image/120db6f90955814bab93a8ca1f19cbcad473fc22833f52f4d29d066135fd10b6 INFO[0029] DONE
(command) lpmx docker list
(result)
Name
ubuntu:14.04
ubuntu:16.10
(command) lpmx docker create ubuntu:16.10
(result) root@ubuntu:/#
(Note) lpmx will automatically create and open bash shell.
(command) lpmx docker delete ubuntu:16.10
(result) INFO[0000] DONE
(Note) docker image is removed locally
NOTE: Users can always resume exited containers by 'lpmx resume' command. For the id of the container, users can always use 'lpmx list' command to show info of all registered containers.
'lpmx singularity' command is our newly added command targeting support Singularity image (SIF image), by using this command, users can import and create containers based on Singularity images. (Experimental Feature Currently)
singularity command is the advanced command of lpmx, which is used for executing singularity related commands
Usage:
lpmx singularity [command]
Available Commands:
create initialize the local singularity images
delete delete the local singularity images
fastrun run container in a fast way without switching into shell
list list local singularity images
load load local sif image
Flags:
-h, --help help for singularity
Use "lpmx singularity [command] --help" for more information about a command.
Similar to 'lpmx docker' command, 'lpmx singularity' command supports loading SIF images, and create containers based on loaded images. Commands listed above have the same options as listed in 'lpx docker' command.
'lpmx list' command is used for listing the information of all the registered containers, including containerid, container rpc port(NA for no rpc port)
list command is the basic command of lpmx, which is used for listing all the containers registered
Usage:
lpmx list [flags]
Flags:
-h, --help help for list
'lpmx resume' command is used for resuming stopped container, you need to use this command with container id argument
resume command is the basic command of lpmx, which is used for resuming the registered container via id
Usage:
lpmx resume [flags]
Flags:
-h, --help help for resume
destroy command is the basic command of lpmx, which is used for destroying the registered container via id
Usage:
lpmx destroy [flags]
Flags:
-h, --help help for destroy
Example:
./lpmx destroy containerid
'lpmx expose' command is used for exposing applications inside containers to host, i.e, users can directly call apps inside containers from host OS.
! To run this command, you should stop current running container.
expose command is the advanced command of lpmx, which is used for exposing binaries inside containers to host, id is the container id containing the exposed program, name is the customized name given by end-users, path is the full path of program inside the container
Usage:
lpmx expose [flags]
Flags:
-h, --help help for expose
-i, --id string required
-n, --name string required
-p, --path string required
'lpmx get' command is used for getting app settings from memcache server, values are set by using 'lpmx set' command.
get command is the basic command of lpmx, which is used for getting settings from cache server
Usage:
lpmx get [flags]
Flags:
-h, --help help for get
-i, --id string required
-n, --name string required
set command is an advanced comand of lpmx, which is used for setting environment variables of running containers, you should clearly know what you want before using this command, it will reduce the performance heavily
Usage:
lpmx set [flags]
Flags:
-h, --help help for set
-i, --id string required(container id, you can get the id by command 'lpmx list')
-n, --name string required(should be the name of libc 'system calls wrapper')
-t, --type string required('add_map','remove_map')
-v, --value string required(value(file1:replace_file1;file2:repalce_file2;))
We add many features to the original fakechroot, including fake union file system implementation, dynamically privileges management and more.
Precompiled fakechroot libraries are listed in this repository. However, we only provide the most compatible version compiled with an older glibc. If you need to compile all dependencies for lpmx for your distro or with specific glibc version.
Following dependencies should be satisfied:
- git
- autoconf(some old distros will fail to compile source code because of older autoconf(should be >2.64), in this case, please download newer autoconf source code HERE and compile it locally)
- automake
- make
- gcc
- g++
- libmemcached-dev(also may need to download source code HERE to compile locally)
- cmake
- libtool
- msgpack-c
- fakeroot
- memcached (for memcached binary program)
- libssl-dev (for some Linux distros, e.g debian based)
If you could directly install msgpack-c via your package manager, it will be good and you don't need cmake. For example, for arch linux, one could directly install msgpack-c package from AUR by executing 'yaourt -S msgpack-c'. For other distros, such as ubuntu, you may need to compile msgpack-c from source by following the steps:
git clone https://github.com/msgpack/msgpack-c.git
cd msgpack-c
cmake .
make
sudo make install
After these steps, you could start compiling fakechroot.
git clone https://github.com/JasonYangShadow/fakechroot
cd fakechroot
./autogen.sh
./configure
make
Please refer this bash script for packaging dependencies into one tar ball(.tar.gz).
Dependencies required by LPMX are libfakechroot, libfakeroot, faked-sys, libevent, libmemcached, libsasl2, memcached
lpmx receive yml configuration file while creating containers
some configurations can be put in as your requirements:
**NOTE** users may not need to modify configuration files themselves in principle unless they clearly know what they want. Most items in configuration file are set and configurated by LPMX itself, any new value will overrite default one. Therefore, if any errors occur after modification, please empty configuration file and recreate containers.