64 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			Go
		
	
	
	
| package define
 | |
| 
 | |
| // CommonBuildOptions are resources that can be defined by flags for both buildah from and build-using-dockerfile
 | |
| type CommonBuildOptions struct {
 | |
| 	// AddHost is the list of hostnames to add to the build container's /etc/hosts.
 | |
| 	AddHost []string
 | |
| 	// CgroupParent is the path to cgroups under which the cgroup for the container will be created.
 | |
| 	CgroupParent string
 | |
| 	// CPUPeriod limits the CPU CFS (Completely Fair Scheduler) period
 | |
| 	CPUPeriod uint64
 | |
| 	// CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota
 | |
| 	CPUQuota int64
 | |
| 	// CPUShares (relative weight
 | |
| 	CPUShares uint64
 | |
| 	// CPUSetCPUs in which to allow execution (0-3, 0,1)
 | |
| 	CPUSetCPUs string
 | |
| 	// CPUSetMems memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
 | |
| 	CPUSetMems string
 | |
| 	// HTTPProxy determines whether *_proxy env vars from the build host are passed into the container.
 | |
| 	HTTPProxy bool
 | |
| 	// Memory is the upper limit (in bytes) on how much memory running containers can use.
 | |
| 	Memory int64
 | |
| 	// DNSSearch is the list of DNS search domains to add to the build container's /etc/resolv.conf
 | |
| 	DNSSearch []string
 | |
| 	// DNSServers is the list of DNS servers to add to the build container's /etc/resolv.conf
 | |
| 	DNSServers []string
 | |
| 	// DNSOptions is the list of DNS
 | |
| 	DNSOptions []string
 | |
| 	// MemorySwap limits the amount of memory and swap together.
 | |
| 	MemorySwap int64
 | |
| 	// LabelOpts is the a slice of fields of an SELinux context, given in "field:pair" format, or "disable".
 | |
| 	// Recognized field names are "role", "type", and "level".
 | |
| 	LabelOpts []string
 | |
| 	// OmitTimestamp forces epoch 0 as created timestamp to allow for
 | |
| 	// deterministic, content-addressable builds.
 | |
| 	OmitTimestamp bool
 | |
| 	// SeccompProfilePath is the pathname of a seccomp profile.
 | |
| 	SeccompProfilePath string
 | |
| 	// ApparmorProfile is the name of an apparmor profile.
 | |
| 	ApparmorProfile string
 | |
| 	// ShmSize is the "size" value to use when mounting an shmfs on the container's /dev/shm directory.
 | |
| 	ShmSize string
 | |
| 	// Ulimit specifies resource limit options, in the form type:softlimit[:hardlimit].
 | |
| 	// These types are recognized:
 | |
| 	// "core": maximum core dump size (ulimit -c)
 | |
| 	// "cpu": maximum CPU time (ulimit -t)
 | |
| 	// "data": maximum size of a process's data segment (ulimit -d)
 | |
| 	// "fsize": maximum size of new files (ulimit -f)
 | |
| 	// "locks": maximum number of file locks (ulimit -x)
 | |
| 	// "memlock": maximum amount of locked memory (ulimit -l)
 | |
| 	// "msgqueue": maximum amount of data in message queues (ulimit -q)
 | |
| 	// "nice": niceness adjustment (nice -n, ulimit -e)
 | |
| 	// "nofile": maximum number of open files (ulimit -n)
 | |
| 	// "nproc": maximum number of processes (ulimit -u)
 | |
| 	// "rss": maximum size of a process's (ulimit -m)
 | |
| 	// "rtprio": maximum real-time scheduling priority (ulimit -r)
 | |
| 	// "rttime": maximum amount of real-time execution between blocking syscalls
 | |
| 	// "sigpending": maximum number of pending signals (ulimit -i)
 | |
| 	// "stack": maximum stack size (ulimit -s)
 | |
| 	Ulimit []string
 | |
| 	// Volumes to bind mount into the container
 | |
| 	Volumes []string
 | |
| }
 |