neulab/tldr huggingface dataset:
To edit/create a file start with a cluster line for the new cluster:
Cluster - cluster_name:MaxTRESPerJob=node=15
Anything included on this line will be the default for all associations on this cluster.  The options for the cluster are:
GrpTRESMins= The total number of TRES minutes that can possibly be used by past, present and future jobs running from this association and its children.
GrpTRESRunMins= Used to limit the combined total number of TRES minutes used by all jobs running with this association and its children.  This takes into consideration time limit of running jobs and consumes it, if the limit is reached no new jobs are started until other jobs finish to allow time to free up.
GrpTRES= Maximum number of TRES running jobs are able to be allocated in aggregate for this association and all associations which are children of this association.
GrpJobs= Maximum number of running jobs in aggregate for this association and all associations which are children of this association.
GrpJobsAccrue= Maximum number of pending jobs in aggregate able to accrue age priority for this association and all associations which are children of this association.
GrpNodes= Maximum number of nodes running jobs are able to be allocated in aggregate for this association and all associations which are children of this association.
GrpSubmitJobs= Maximum number of jobs which can be in a pending or running state at any time in aggregate for this association and all associations which are children of this association.
GrpWall= Maximum wall clock time running jobs are able to be allocated in aggregate for this association and all associations which are children of this association.
FairShare= Number used in conjunction with other associations to determine job priority.
MaxJobs= Maximum number of jobs the children of this association can run.
MaxTRESPerJob= Maximum number of trackable resources per job the children of this association can run.
MaxWallDurationPerJob= Maximum time (not related to job size) children of this accounts jobs can run.
QOS= Comma separated list of Quality of Service names (Defined in sacctmgr).
After the entry for the root account you will have entries for the other accounts on the system. The entries will look similar to this example:
Parent - root Account - cs:MaxTRESPerJob=node=5:MaxJobs=4:FairShare=399:MaxWallDurationPerJob=40:Description='Computer Science':Organization='LC' Parent - cs Account - test:MaxTRESPerJob=node=1:MaxJobs=1:FairShare=1:MaxWallDurationPerJob=1:Description='Test Account':Organization='Test'
Any of the options after a ':' can be left out and they can be in any order. If you want to add any sub accounts just list the Parent THAT HAS ALREADY BEEN CREATED before the account you are adding.
Account options are:
Description= A brief description of the account.
GrpTRESMins= Maximum number of TRES hours running jobs are able to be allocated in aggregate for this association and all associations which are children of this association. GrpTRESRunMins= Used to limit the combined total number of TRES minutes used by all jobs running with this association and its children.  This takes into consideration time limit of running jobs and consumes it, if the limit is reached no new jobs are started until other jobs finish to allow time to free up.
MaxNodesPerJob= Maximum number of nodes per job the children of this association can run.
Organization= Name of organization that owns this account.
QOS(=,+=,-=) Comma separated list of Quality of Service names (Defined in sacctmgr).
To add users to an account add a line after the Parent line, similar to this:
Parent - test User - adam:MaxTRESPerJob=node:2:MaxJobs=3:FairShare=1:MaxWallDurationPerJob=1:AdminLevel=Operator:Coordinator='test'
User options are:
AdminLevel= Type of admin this user is (Administrator, Operator) Must be defined on the first occurrence of the user.
Coordinator= Comma separated list of accounts this user is coordinator over Must be defined on the first occurrence of the user.
DefaultAccount= System wide default account name Must be defined on the first occurrence of the user.
MaxJobs= Maximum number of jobs this user can run.
MaxTRESPerJob= Maximum number of trackable resources per job this user can run.
MaxWallDurationPerJob= Maximum time (not related to job size) this user can run.
Sacctmgr has the capability to archive to a flatfile and or load that data if needed later.  The archiving is usually done by the slurmdbd and it is highly recommended you only do it through sacctmgr if you completely understand what you are doing.  For slurmdbd options see "man slurmdbd" for more information.  Loading data into the database can be done from these files to either view old data or regenerate rolled up data.
archive dump Dump accounting data to file. Data will not be archived unless the corresponding purge option is included in this command or in slurmdbd.conf.  This operation cannot be rolled back once executed. If one of the following options is not specified when sacctmgr is called, the value configured in slurmdbd.conf is used.
Directory= Directory to store the archive data.
Events Archive Events.  If not specified and PurgeEventAfter is set all event data removed will be lost permanently.
Jobs   Archive Jobs.  If not specified and PurgeJobAfter is set all job data removed will be lost permanently.
PurgeEventAfter= Purge cluster event records older than time stated in months.  If you want to purge on a shorter time period you can include hours, or days behind the numeric value to get those more frequent purges. (e.g. a value of '12hours' would purge everything older than 12 hours.)
PurgeJobAfter= Purge job records older than time stated in months.  If you want to purge on a shorter time period you can include hours, or days behind the numeric value to get those more frequent purges. (e.g. a value of '12hours' would purge everything older than 12 hours.)
PurgeStepAfter= Purge step records older than time stated in months.  If you want to purge on a shorter time period you can include hours, or days behind the numeric value to get those more frequent purges. (e.g. a value of '12hours' would purge everything older than 12 hours.)
PurgeSuspendAfter= Purge job suspend records older than time stated in months.  If you want to purge on a shorter time period you can include hours, or days behind the numeric value to get those more frequent purges. (e.g. a value of '12hours' would purge everything older than 12 hours.)
Script= Run this script instead of the generic form of archive to flat files.
Steps  Archive Steps.  If not specified and PurgeStepAfter is set all step data removed will be lost permanently.
Suspend Archive Suspend Data.  If not specified and PurgeSuspendAfter is set all suspend data removed will be lost permanently.
archive load Load in to the database previously archived data. The archive file will not be loaded if the records already exist in the database - therefore, trying to load an archive file more than once will result in an error. When this data is again archived and purged from the database, if the old archive file is still in the directory ArchiveDir, a new archive file will be created (see ArchiveDir in the slurmdbd.conf man page), so the old file will not be overwritten and these files will have duplicate records.
File=  File to load into database. The specified file must exist on the slurmdbd host, which is not necessarily the machine running the command.
Insert= SQL to insert directly into the database.  This should be used very cautiously since this is writing your sql into the database.
Executing sacctmgr sends a remote procedure call to slurmdbd. If enough calls from sacctmgr or other Slurm client commands that send remote procedure calls to the slurmdbd daemon come in at once, it can result in a degradation of performance of the slurmdbd daemon, possibly resulting in a denial of service.
Do not run sacctmgr or other Slurm client commands that send remote procedure calls to slurmdbd from loops in shell scripts or other programs.  Ensure that programs limit calls to sacctmgr to the minimum necessary for the information you are trying to gather.
Some sacctmgr options may be set via environment variables. These environment variables, along with their corresponding options, are listed below.  (Note: commandline options will always override these settings)
NOTE: There is an order to set up accounting associations.  You must define clusters before you add accounts and you must add accounts before you can add users.
-> sacctmgr create cluster tux -> sacctmgr create account name=science fairshare=50 -> sacctmgr create account name=chemistry parent=science fairshare=30 -> sacctmgr create account name=physics parent=science fairshare=20 -> sacctmgr create user name=adam cluster=tux account=physics fairshare=10 -> sacctmgr delete user name=adam cluster=tux account=physics -> sacctmgr delete account name=physics cluster=tux -> sacctmgr modify user where name=adam cluster=tux account=physics set maxjobs=2 maxwall=30:00 -> sacctmgr add user brian account=chemistry -> sacctmgr list associations cluster=tux format=Account,Cluster,User,Fairshare tree withd -> sacctmgr list transactions Action="Add Users" Start=11/03-10:30:00 format=Where,Time -> sacctmgr dump cluster=tux file=tux_data_file -> sacctmgr load tux_data_file
A user's account can not be changed directly. A new association needs to be created for the user with the new account. Then the association with the old account can be deleted.
When modifying an object placing the key words 'set' and the optional 'where' is critical to perform correctly below are examples to produce correct results.  As a rule of thumb anything you put in front of the set will be used as a quantifier.  If you want to put a quantifier after the key word 'set' you should use the key word 'where'.
wrong-> sacctmgr modify user name=adam set fairshare=10 cluster=tux
This will produce an error as the above line reads modify user adam set fairshare=10 and cluster=tux.
right-> sacctmgr modify user name=adam cluster=tux set fairshare=10 right-> sacctmgr modify user name=adam set fairshare=10 where cluster=tux
When changing qos for something only use the '=' operator when wanting to explicitly set the qos to something.  In most cases you will want to use the '+=' or '\-=' operator to either add to or remove from the existing qos already in place.
If a user already has qos of normal,standby for a parent or it was explicitly set you should use qos+=expedite to add this to the list in this fashion.
If you are looking to only add the qos expedite to only a certain account and or cluster you can do that by specifying them in the sacctmgr line.
-> sacctmgr modify user name=adam set qos+=expedite
> sacctmgr modify user name=adam acct=this cluster=tux set qos+=expedite
Let's give an example how to add QOS to user accounts.  List all available QOSs in the cluster.
->sacctmgr show qos format=name Name --------- normal expedite
List all the associations in the cluster.
->sacctmgr show assoc format=cluster,account,qos Cluster    Account    QOS --------  ---------- ----- zebra       root         normal zebra       root         normal zebra          g         normal zebra         g1         normal
Add the QOS expedite to account G1 and display the result.  Using the operator += the QOS will be added together with the  existing QOS to this account.
->sacctmgr modify account name=g1 set qos+=expedite
->sacctmgr show assoc format=cluster,account,qos Cluster    Account   QOS --------  --------  ------- zebra       root         normal zebra       root         normal zebra          g         normal zebra         g1  expedite,normal
Now set the QOS expedite as the only QOS for the account G and display the result. Using the operator = that expedite is the only usable QOS by account G
->sacctmgr modify account name=G set qos=expedite
>sacctmgr show assoc format=cluster,account,user,qos Cluster    Account  QOS ---------   -------- ----- zebra       root      normal zebra       root      normal zebra          g      expedite zebra         g1      expedite,normal
If a new account is added under the account G it will inherit the QOS expedite and it will not have access to QOS normal.
->sacctmgr add account banana parent=G
->sacctmgr show assoc format=cluster,account,qos Cluster    Account   QOS ---------  --------  ----- zebra       root       normal zebra       root       normal zebra          g       expedite zebra     banana       expedite zebra         g1       expedite,normal
An example of listing trackable resources
->sacctmgr show tres Type              Name      ID ---------- ----------------- -------- cpu                          1 mem                          2 energy                          3 node                          4 billing                          5 gres         gpu:tesla     1001 license               vcs     1002 bb              cray     1003
Copyright (C) 2008-2010 Lawrence Livermore National Security.  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). Copyright (C) 2010-2016 SchedMD LLC.
slurm.conf(5), slurmdbd(8)
DCONF(7)                  Conventions and miscellaneous                 DCONF(7)
dconf - A configuration system
dconf is a simple key/value storage system that is heavily optimised for reading. This makes it an ideal system for storing user preferences (which are read 1000s of times for each time the user changes one). It was created with this usecase in mind.
All preferences are stored in a single large binary file. Layering of preferences is possible using multiple files (ie: for site defaults). Lock-down is also supported. The binary file for the defaults can optionally be compiled from a set of plain text keyfiles.
dconf has a partial client/server architecture. It uses D-Bus. The server is only involved in writes (and is not activated in the user session until the user modifies a preference). The service is stateless and can exit freely at any time (and is therefore robust against crashes). The list of paths that each process is watching is stored within the D-Bus daemon itself (as D-Bus signal match rules).
Reads are performed by direct access (via mmap) to the on-disk database which is essentially a hashtable. For this reason, dconf reads typically involve zero system calls and are comparable to a hashtable lookup in terms of speed. Practically speaking, in simple non-layered setups, dconf is less than 10 times slower than GHashTable.
Writes are assumed only to happen in response to explicit user interaction (like clicking on a checkbox in a preferences dialog) and are therefore not optimised at all. On some file systems, dconf-service will call fsync() for every write, which can introduce a latency of up to 100ms. This latency is hidden by the client libraries through a clever "fast" mechanism that records the outstanding changes locally (so they can be read back immediately) until the service signals that a write has completed.
The binary database format that dconf uses by default is not suitable for use on NFS, where mmap does not work well. To handle this common use case, dconf can be configured to place its binary database in XDG_RUNTIME_DIR (which is guaranteed to be local, but non-persistent) and synchronize it with a plain text keyfile in the users home directory.
A profile is a list of configuration databases that dconf consults to find the value for a key. The user's personal database always takes the highest priority, followed by the system databases in the order prescribed by the profile.
On startup, dconf consults the DCONF_PROFILE environment variable. If set, dconf will attempt to open the named profile, aborting if that fails. If the environment variable is not set, it will attempt to open the profile named "user" and if that fails, it will fall back to an internal hard-wired configuration. dconf stores its profiles in text files.  DCONF_PROFILE can specify a relative path to a file in /etc/dconf/profile/, or an absolute path (such as in a user's home directory). The profile name can only use alphanumeric characters or '_'.
A profile file might look like the following:
user-db:user system-db:local system-db:site
Each line in a profile specifies one dconf database. The first line indicates the database used to write changes, and the remaining lines indicate read-only databases. (The first line should specify a user-db or service-db, so that users can actually make configuration changes.)
A "user-db" line specifies a user database. These databases are found in $XDG_CONFIG_HOME/dconf/. The name of the file to open in that directory is exactly as it is written in the profile. This file is expected to be in the binary dconf database format. Note that XDG_CONFIG_HOME cannot be set/modified per terminal or session, because then the writer and reader would be working on different DBs (the writer is started by DBus and cannot see that variable).
A "service-db" line instructs dconf to place the binary database file for the user database in XDG_RUNTIME_DIR. Since this location is not persistent, the rest of the line instructs dconf how to store the database persistently. A typical line is service-db:keyfile/user, which tells dconf to synchronize the binary database with a plain text keyfile in $XDG_CONFIG_HOME/dconf/user.txt. The synchronization is bi-directional.
A "system-db" line specifies a system database. These databases are found in /etc/dconf/db/. Again, the name of the file to open in that directory is exactly as it is written in the profile and the file is expected to be in the dconf database format.
If the DCONF_PROFILE environment variable is unset and the "user" profile can not be opened, then the effect is as if the profile was specified by this file:
user-db:user
That is, the user's personal database is consulted and there are no system settings.
To facilitate system configuration with a text editor, dconf can populate databases from plain text keyfiles. For any given system database, keyfiles can be placed into the /etc/dconf/db/database.d/ directory. The keyfiles contain groups of settings as follows:
# Some useful default settings for our site
[system/proxy/http] host='172.16.0.1' enabled=true
[org/gnome/desktop/background] picture-uri='file:///usr/local/rupert-corp/company-wallpaper.jpeg'
After changing keyfiles, the database needs to be updated with the dconf(1) tool.
System databases can contain 'locks' for keys. If a lock for a particular key or subpath is installed into a database then no database listed above that one in the profile will be able to modify any of the affected settings. This can be used to enforce mandatory settings.
To add locks to a database, place text files in the /etc/dconf/db/database.d/locks directory, where database is the name of a system database, as specified in the profile. The files contain list of keys to lock, on per line. Lines starting with a # are ignored. Here is an example:
# prevent changes to the company wallpaper /org/gnome/desktop/background/picture-uri
After changing locks, the database needs to be updated with the dconf(1) tool.
dconf mostly targets Free Software operating systems. It will theoretically run on Mac OS but there isn't much point to that (since Mac OS applications want to store preferences in plist files). It is not possible to use dconf on Windows because of the inability to rename over a file that's still in use (which is what the dconf-service does on every write).
The dconf API is not particularly friendly, and is not guaranteed to be stable. Because of this and the lack of portability, you almost certainly want to use some sort of wrapper API around it. The wrapper API used by GTK+ and GNOME applications is GSettings[1], which is included as part of GLib. GSettings has backends for Windows (using the registry) and Mac OS (using property lists) as well as its dconf backend and is the proper API to use for graphical applications.
dconf-service(1), dconf-editor(1), dconf(1), GSettings[1]
1. GSettings http://developer.gnome.org/gio/stable/GSettings.html
docker-run - Run a command in a new container
docker run [-a|--attach[=[]]] [--add-host[=[]]] [--blkio-weight[=[BLKIO- WEIGHT]]] [--blkio-weight-device[=[]]] [--cpu-shares[=0]] [--cap- add[=[]]] [--cap-drop[=[]]] [--cgroupns[=[]]] [--cgroup-parent[=CGROUP- PATH]] [--cidfile[=CIDFILE]] [--cpu-count[=0]] [--cpu-percent[=0]] [--cpu-period[=0]] [--cpu-quota[=0]] [--cpu-rt-period[=0]] [--cpu-rt- runtime[=0]] [--cpus[=0.0]] [--cpuset-cpus[=CPUSET-CPUS]] [--cpuset- mems[=CPUSET-MEMS]] [-d|--detach] [--detach-keys[=[]]] [--device[=[]]] [--device-cgroup-rule[=[]]] [--device-read-bps[=[]]] [--device-read- iops[=[]]] [--device-write-bps[=[]]] [--device-write-iops[=[]]] [--dns[=[]]] [--dns-option[=[]]] [--dns-search[=[]]] [--domainname[=DOMAINNAME]] [-e|--env[=[]]] [--entrypoint[=ENTRYPOINT]] [--env-file[=[]]] [--expose[=[]]] [--group-add[=[]]] [-h|--hostname[=HOSTNAME]] [--help] [--init] [-i|--interactive] [--ip[=IPv4-ADDRESS]] [--ip6[=IPv6-ADDRESS]] [--ipc[=IPC]] [--isolation[=default]] [--kernel-memory[=KERNEL-MEMORY]] [-l|--label[=[]]] [--label-file[=[]]] [--link[=[]]] [--link-local- ip[=[]]] [--log-driver[=[]]] [--log-opt[=[]]] [-m|--memory[=MEMORY]] [--mac-address[=MAC-ADDRESS]] [--memory-reservation[=MEMORY-RESERVATION]] [--memory-swap[=LIMIT]] [--memory-swappiness[=MEMORY-SWAPPINESS]] [--mount[=[MOUNT]]] [--name[=NAME]] [--network-alias[=[]]] [--network[="bridge"]] [--oom-kill-disable] [--oom-score-adj[=0]] [-P|--publish-all] [-p|--publish[=[]]] [--pid[=[PID]]] [--userns[=[]]] [--pids-limit[=PIDS_LIMIT]] [--privileged] [--read-only] [--restart[=RESTART]] [--rm] [--security-opt[=[]]] [--storage-opt[=[]]] [--stop-signal[=SIGNAL]] [--stop-timeout[=TIMEOUT]] [--shm-size[=[]]] [--sig-proxy[=true]] [--sysctl[=[]]] [-t|--tty] [--tmpfs[=[CONTAINER- DIR[:OPTIONS]]] [-u|--user[=USER]] [--ulimit[=[]]] [--uts[=[]]] [-v|--volume[=[[HOST-DIR:]CONTAINER-DIR[:OPTIONS]]]] [--volume- driver[=DRIVER]] [--volumes-from[=[]]] [-w|--workdir[=WORKDIR]] IMAGE [COMMAND] [ARG...]
Run a process in a new container. docker run starts a process with its own file system, its own networking, and its own isolated process tree. The IMAGE which starts the process may define defaults related to the process that will be run in the container, the networking to expose, and more, but docker run gives final control to the operator or administrator who starts the container from the image. For that reason docker run has more options than any other Docker command.
If the IMAGE is not already loaded then docker run will pull the IMAGE, and all image dependencies, from the repository in the same way running docker pull IMAGE, before it starts the container from that image.
-a, --attach=[] Attach to STDIN, STDOUT or STDERR.
In foreground mode (the default when -d is not specified), docker run can start the process in the container and attach the console to the process's standard input, output, and standard error. It can even pretend to be a TTY (this is what most commandline executables expect) and pass along signals. The -a option can be set for each of stdin, stdout, and stderr.
--add-host=[] Add a custom host-to-IP mapping (host:ip)
Add a line to /etc/hosts. The format is hostname:ip.  The --add-host option can be set multiple times.
--blkio-weight=0 Block IO weight (relative weight) accepts a weight value between 10 and 1000.
--blkio-weight-device=[] Block IO weight (relative device weight, format: DEVICE_NAME:WEIGHT).
--cpu-shares=0 CPU shares (relative weight)
By default, all containers get the same proportion of CPU cycles. This proportion can be modified by changing the container's CPU share weighting relative to the weighting of all other running containers.
To modify the proportion from the default of 1024, use the --cpu-shares flag to set the weighting to 2 or higher.
The proportion will only apply when CPU-intensive processes are running. When tasks in one container are idle, other containers can use the left- over CPU time. The actual amount of CPU time will vary depending on the number of containers running on the system.
For example, consider three containers, one has a cpu-share of 1024 and two others have a cpu-share setting of 512. When processes in all three containers attempt to use 100% of CPU, the first container would receive 50% of the total CPU time. If you add a fourth container with a cpu-share of 1024, the first container only gets 33% of the CPU. The remaining containers receive 16.5%, 16.5% and 33% of the CPU.
On a multi-core system, the shares of CPU time are distributed over all CPU cores. Even if a container is limited to less than 100% of CPU time, it can use 100% of each individual CPU core.
For example, consider a system with more than three cores. If you start one container {C0} with -c=512 running one process, and another container {C1} with -c=1024 running two processes, this can result in the following division of CPU shares:
PID    container    CPU  CPU share 100    {C0}         0    100% of CPU0 101    {C1}         1    100% of CPU1 102    {C1}         2    100% of CPU2
--cap-add=[] Add Linux capabilities
--cap-drop=[] Drop Linux capabilities
--cgroupns="" Set the cgroup namespace mode for the container. host:    run the container in the host's cgroup namespace private: run the container in its own private cgroup namespace "":      (unset) use the daemon's default configuration (host on cgroup v1, private on cgroup v2)
--cgroup-parent="" Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
--cidfile="" Write the container ID to the file
--cpu-count=0 Limit the number of CPUs available for execution by the container.
On Windows Server containers, this is approximated as a percentage of total CPU usage.
On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
--cpu-percent=0 Limit the percentage of CPU available for execution by a container running on a Windows daemon.
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period
Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify.
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
If you have four memory nodes on your system (0-3), use --cpuset-mems=0,1 then processes in your Docker container will only use memory from the first two memory nodes.
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota
Limit the container's CPU usage. By default, containers run with the full CPU resource. This flag tell the kernel to restrict the container's CPU usage to the quota you specify.
--cpu-rt-period=0 Limit the CPU real-time period in microseconds
Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify.
--cpu-rt-runtime=0 Limit the CPU real-time runtime in microseconds
Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks.
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
--cpus=0.0 Number of CPUs. The default is 0.0 which means no limit.
-d, --detach=true|false Detached mode: run the container in the background and print the new container ID. The default is false.
At any time you can run docker ps in the other shell to view a list of the running containers. You can reattach to a detached container with docker attach.
When attached in the tty mode, you can detach from the container (and leave it running) using a configurable key sequence. The default sequence is CTRL-p CTRL-q.  You configure the key sequence using the --detach-keys option or a configuration file.  See config-json(5) for documentation on using a configuration file.
--detach-keys=key Override the key sequence for detaching a container; key is a single character from the [a-Z] range, or ctrl-value, where value is one of: a- z, @, ^, [, ,, or _.
--device=onhost:incontainer[:mode] Add a host device onhost to the container under the incontainer name. Optional mode parameter can be used to specify device permissions, it is a combination of r (for read), w (for write), and m (for mknod(2)).
For example, --device=/dev/sdc:/dev/xvdc:rwm will give a container all permissions for the host device /dev/sdc, seen as /dev/xvdc inside the container.
--device-cgroup-rule="type major:minor mode" Add a rule to the cgroup allowed devices list. The rule is expected to be in the format specified in the Linux kernel documentation (Documentation/cgroup-v1/devices.txt): - type: a (all), c (char), or b (block); - major and minor: either a number, or * for all; - mode: a composition of r (read), w (write), and m (mknod(2)).
Example: --device-cgroup-rule "c 1:3 mr": allow for a character device idendified by 1:3  to be created and read.
--device-read-bps=[] Limit read rate from a device (e.g. --device-read-bps=/dev/sda:1mb)
--device-read-iops=[] Limit read rate from a device (e.g. --device-read-iops=/dev/sda:1000)
--device-write-bps=[] Limit write rate to a device (e.g. --device-write-bps=/dev/sda:1mb)
--device-write-iops=[] Limit write rate to a device (e.g. --device-write-iops=/dev/sda:1000)
--dns-search=[] Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
--dns-option=[] Set custom DNS options
--dns=[] Set custom DNS servers
This option can be used to override the DNS configuration passed to the container. Typically this is necessary when the host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this is the case the --dns flags is necessary for every run.
--domainname="" Container NIS domain name
Sets the container's NIS domain name (see also setdomainname(2)) that is available inside the container.
-e, --env=[] Set environment variables
This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container.
--entrypoint="" Overwrite the default ENTRYPOINT of the image
This option allows you to overwrite the default entrypoint of the image that is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND because it specifies what executable to run when the container starts, but it is (purposely) more difficult to override. The ENTRYPOINT gives a container its default nature or behavior, so that when you set an ENTRYPOINT you can run the container as if it were that binary, complete with default options, and you can pass in more options via the COMMAND. But, sometimes an operator may want to run something else inside the container, so you can override the default ENTRYPOINT at runtime by using a --entrypoint and a string to specify the new ENTRYPOINT.
--env-file=[] Read in a line delimited file of environment variables
--expose=[] Expose a port, or a range of ports (e.g. --expose=3300-3310) informs Docker that the container listens on the specified network ports at runtime. Docker uses this information to interconnect containers using links and to set up port redirection on the host system.
--group-add=[] Add additional groups to run as
-h, --hostname="" Container host name
Sets the container host name that is available inside the container.
--init Run an init inside the container that forwards signals and reaps processes
-i, --interactive=true|false Keep STDIN open even if not attached. The default is false.
When set to true, keep stdin open even if not attached.
--ip="" Sets the container's interface IPv4 address (e.g., 172.23.0.9)
It can only be used in conjunction with --network for user-defined networks
--ip6="" Sets the container's interface IPv6 address (e.g., 2001:db8::1b99)
--ipc="" Sets the IPC mode for the container. The following values are accepted:
┌─────────────────────┬─────────────────────────────┐ │Value                │ Description                 │ ├─────────────────────┼─────────────────────────────┤ │(empty)              │ Use daemon's default.       │ ├─────────────────────┼─────────────────────────────┤ │none                 │ Own private IPC namespace,  │ │                     │ with /dev/shm not mounted.  │ ├─────────────────────┼─────────────────────────────┤ │private              │ Own private IPC namespace.  │ ├─────────────────────┼─────────────────────────────┤ │shareable            │ Own private IPC namespace,  │ │                     │ with a possibility to share │ │                     │ it with other containers.   │ ├─────────────────────┼─────────────────────────────┤ │container:name-or-ID │ Join another ("shareable")  │ │                     │ container's IPC namespace.  │ ├─────────────────────┼─────────────────────────────┤ │host                 │ Use the host system's IPC   │ │                     │ namespace.                  │ └─────────────────────┴─────────────────────────────┘
If not specified, daemon default is used, which can either be private or shareable, depending on the daemon version and configuration.
-l, --label key=value Set metadata on the container (for example, --label com.example.key=value).
--kernel-memory=number[S] Kernel memory limit; S is an optional suffix which can be one of b, k, m, or g.
Constrains the kernel memory available to a container. If a limit of 0 is specified (not using --kernel-memory), the container's kernel memory is not limited. If you specify a limit, it may be rounded up to a multiple of the operating system's page size and the value can be very large, millions of trillions.
--label-file=[] Read in a line delimited file of labels
--link=name-or-id[:alias] Add link to another container.
If the operator uses --link when starting the new client container, then the client container can access the exposed port via a private networking interface. Docker will set some environment variables in the client container to help indicate which interface and port to use.
--link-local-ip=[] Add one or more link-local IPv4/IPv6 addresses to the container's interface
--log-driver="json- file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none" Logging driver for the container. Default is defined by daemon --log- driver flag. Warning: the docker logs command works only for the json-file and journald logging drivers.
-m, --memory=number[*S] Memory limit; S is an optional suffix which can be one of b, k, m, or g.
Allows you to constrain the memory available to a container. If the host supports swap memory, then the -m memory setting can be larger than physical RAM. If a limit of 0 is specified (not using -m), the container's memory is not limited. The actual limit may be rounded up to a multiple of the operating system's page size (the value would be very large, that's millions of trillions).
--memory-reservation=number[*S] Memory soft limit; S is an optional suffix which can be one of b, k, m, or g.
After setting memory reservation, when the system detects memory contention or low memory, containers are forced to restrict their consumption to their reservation. So you should always set the value below --memory, otherwise the hard limit will take precedence. By default, memory reservation will be the same as memory limit.
--memory-swap=number[S] Combined memory plus swap limit; S is an optional suffix which can be one of b, k, m, or g.
This option can only be used together with --memory. The argument should always be larger than that of --memory. Default is double the value of --memory. Set to -1 to enable unlimited swap.
--mac-address="" Container MAC address (e.g., 92:d0:c6:0a:29:33)
Remember that the MAC address in an Ethernet network must be unique.  The IPv6 link-local address will be based on the device's MAC address according to RFC4862.
--mount type=TYPE,TYPE-SPECIFIC-OPTION[,...] Attach a filesystem mount to the container
Current supported mount TYPES are bind, volume, and tmpfs.
type=bind,source=/path/on/host,destination=/path/in/container
type=volume,source=my-volume,destination=/path/in/container,volume- label="color=red",volume-label="shape=round"
type=tmpfs,tmpfs-size=512M,destination=/path/in/container
Common Options:
• src, source: mount source spec for bind and volume. Mandatory for bind.
• dst, destination, target: mount destination spec.
• ro, readonly: true or false (default).
Note: setting readonly for a bind mount does not make its submounts read-only on the current Linux implementation. See also bind- nonrecursive.
Options specific to bind:
• bind-propagation: shared, slave, private, rshared, rslave, or rprivate(default). See also mount(2).
• consistency: consistent(default), cached, or delegated. Currently, only effective for Docker for Mac.
• bind-nonrecursive: true or false (default). If set to true, submounts are not recursively bind-mounted. This option is useful for readonly bind mount.
Options specific to volume:
• volume-driver: Name of the volume-driver plugin.
• volume-label: Custom metadata.
• volume-nocopy: true(default) or false. If set to false, the Engine copies existing files and directories under the mount- path into the volume, allowing the host to access them.
• volume-opt: specific to a given volume driver.
Options specific to tmpfs:
• tmpfs-size: Size of the tmpfs mount in bytes. Unlimited by default in Linux.
• tmpfs-mode: File mode of the tmpfs in octal. (e.g. 700 or 0700.) Defaults to 1777 in Linux.
--name="" Assign a name to the container
The operator can identify a container in three ways:
┌──────────────────────┬────────────────────────────────────────────────────────────────────┐ │Identifier type       │ Example value                                                      │ ├──────────────────────┼────────────────────────────────────────────────────────────────────┤ │UUID long identifier  │ "f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778" │ ├──────────────────────┼────────────────────────────────────────────────────────────────────┤ │UUID short identifier │ "f78375b1c487"                                                     │ ├──────────────────────┼────────────────────────────────────────────────────────────────────┤ │Name                  │ "evil_ptolemy"                                                     │ └──────────────────────┴────────────────────────────────────────────────────────────────────┘
The UUID identifiers come from the Docker daemon, and if a name is not assigned to the container with --name then the daemon will also generate a random string name. The name is useful when defining links (see --link) (or any other place you need to identify a container). This works for both background and foreground Docker containers.
--network=type Set the Network mode for the container. Supported values are:
┌────────────────────────┬─────────────────────────────┐ │Value                   │ Description                 │ ├────────────────────────┼─────────────────────────────┤ │none                    │ No networking in the        │ │                        │ container.                  │ ├────────────────────────┼─────────────────────────────┤ │bridge                  │ Connect the container to    │ │                        │ the default Docker bridge   │ │                        │ via veth interfaces.        │ ├────────────────────────┼─────────────────────────────┤ │host                    │ Use the host's network      │ │                        │ stack inside the container. │ ├────────────────────────┼─────────────────────────────┤ │container:name|id       │ Use the network stack of    │ │                        │ another container,          │ │                        │ specified via its name or   │ │                        │ id.                         │ ├────────────────────────┼─────────────────────────────┤ │network-name|network-id │ Connects the container to a │ │                        │ user created network (using │ │                        │ docker network create       │ │                        │ command)                    │ └────────────────────────┴─────────────────────────────┘
Default is bridge.
--network-alias=[] Add network-scoped alias for the container
--oom-kill-disable=true|false Whether to disable OOM Killer for the container or not.
--oom-score-adj="" Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all=true|false Publish all exposed ports to random ports on the host interfaces. The default is false.
When set to true publish all exposed ports to the host interfaces. The default is false. If the operator uses -P (or -p) then Docker will make the exposed port accessible on the host and the ports will be available to any client that can reach the host. When using -P, Docker will bind any exposed port to a random port on the host within an ephemeral port range defined by /proc/sys/net/ipv4/ip_local_port_range. To find the mapping between the host ports and the exposed ports, use docker port(1).
-p, --publish ip:[hostPort]:containerPort | [hostPort:]containerPort Publish a container's port, or range of ports, to the host.
Both hostPort and containerPort can be specified as a range.  When specifying ranges for both, the number of ports in ranges should be equal.
Examples: -p 1234-1236:1222-1224, -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT.
Use docker port(1) to see the actual mapping, e.g. docker port CONTAINER $CONTAINERPORT.
--pid="" Set the PID mode for the container Default is to create a private PID namespace for the container 'container:': join another container's PID namespace 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure.
--userns="" Set the usernamespace mode for the container when userns-remap option is enabled. host: use the host usernamespace and enable all privileged options (e.g., pid=host or --privileged).
--pids-limit="" Tune the container's pids (process IDs) limit. Set to -1 to have unlimited pids for the container.
--uts=type Set the UTS mode for the container. The only possible type is host, meaning to use the host's UTS namespace inside the container. Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure.
--privileged [true|false] Give extended privileges to this container. A "privileged" container is given access to all devices.
When the operator executes docker run --privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor to allow the container nearly all the same access to the host as processes running outside of a container on the host.
--read-only=true|false Mount the container's root filesystem as read only.
By default a container will have its root filesystem writable allowing processes to write files anywhere.  By specifying the --read-only flag the container will have its root filesystem mounted as read only prohibiting any writes.
--restart policy Restart policy to apply when a container exits. Supported values are:
┌─────────────────────────┬─────────────────────────────┐ │Policy                   │ Result                      │ ├─────────────────────────┼─────────────────────────────┤ │no                       │ Do not automatically        │ │                         │ restart the container when  │ │                         │ it exits.                   │ ├─────────────────────────┼─────────────────────────────┤ │on-failure[:max-retries] │ Restart only if the         │ │                         │ container exits with a non- │ │                         │ zero exit status.           │ │                         │ Optionally, limit the       │ │                         │ number of restart retries   │ │                         │ the Docker daemon attempts. │ ├─────────────────────────┼─────────────────────────────┤ │always                   │ Always restart the          │ │                         │ container regardless of the │ │                         │ exit status. When you       │ │                         │ specify always, the Docker  │ │                         │ daemon will try to restart  │ │                         │ the container indefinitely. │ │                         │ The container will also     │ │                         │ always start on daemon      │ │                         │ startup, regardless of the  │ │                         │ current state of the        │ │                         │ container.                  │ ├─────────────────────────┼─────────────────────────────┤ │unless-stopped           │ Always restart the          │ │                         │ container regardless of the │ │                         │ exit status, but do not     │ │                         │ start it on daemon startup  │ │                         │ if the container has been   │ │                         │ put to a stopped state      │ │                         │ before.                     │ └─────────────────────────┴─────────────────────────────┘
Default is no.
--rm true|false Automatically remove the container when it exits. The default is false. --rm flag can work together with -d, and auto-removal will be done on daemon side. Note that it's incompatible with any restart policy other than none.
--security-opt value[,...] Security Options for the container. The following options can be given:
"label=user:USER"   : Set the label user for the container "label=role:ROLE"   : Set the label role for the container "label=type:TYPE"   : Set the label type for the container "label=level:LEVEL" : Set the label level for the container "label=disable"     : Turn off label confinement for the container "no-new-privileges" : Disable container processes from gaining additional privileges
"seccomp=unconfined" : Turn off seccomp confinement for the container "seccomp=profile.json :  White listed syscalls seccomp Json file to be used as a seccomp filter
"apparmor=unconfined" : Turn off apparmor confinement for the container "apparmor=your-profile" : Set the apparmor confinement profile for the container
--storage-opt Storage driver options per container
$ docker run -it --storage-opt size=120G fedora /bin/bash
This (size) will allow to set the container rootfs size to 120G at creation time. This option is only available for the devicemapper, btrfs, overlay2 and zfs graph drivers. For the devicemapper, btrfs and zfs storage drivers, user cannot pass a size less than the Default BaseFS Size. For the overlay2 storage driver, the size option is only available if the backing fs is xfs and mounted with the pquota mount option. Under these conditions, user can pass any size less than the backing fs size.
--stop-signal=SIGTERM Signal to stop the container. Default is SIGTERM.
The --stop-signal flag sets the system call signal that will be sent to the container to exit. This signal can be a signal name in the format SIG<NAME>, for instance SIGKILL, or an unsigned number that matches a position in the kernel's syscall table, for instance 9.
--stop-timeout Timeout (in seconds) to stop a container, or -1 to disable timeout.
The --stop-timeout flag sets the number of seconds to wait for the container to stop after sending the pre-defined (see --stop-signal) system call signal. If the container does not exit after the timeout elapses, it is forcibly killed with a SIGKILL signal.
If --stop-timeout is set to -1, no timeout is applied, and the daemon will wait indefinitely for the container to exit.
The default is determined by the daemon, and 10 seconds for Linux containers, and 30 seconds for Windows containers.
--shm-size="" Size of /dev/shm. The format is <number><unit>. number must be greater than 0.  Unit is optional and can be b (bytes), k (kilobytes), m(megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m.
--sysctl=SYSCTL Configure namespaced kernel parameters at runtime
IPC Namespace - current sysctls allowed:
kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced Sysctls beginning with fs.mqueue.*
If you use the --ipc=host option these sysctls will not be allowed.
Network Namespace - current sysctls allowed: Sysctls beginning with net.*
If you use the --network=host option these sysctls will not be allowed.