代码拉取完成,页面将自动刷新
同步操作将从 openEuler/isula-build 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
// isula-build licensed under the Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
// PURPOSE.
// See the Mulan PSL v2 for more details.
// Author: iSula Team
// Create: 2020-1-20
// Description: This file contains default constants used in the project
// Package constant stores constants used for the project
package constant
import "time"
const (
// ConfigRoot is isula-build configuration root path
ConfigRoot = "/etc/isula-build/"
// ConfigurationPath is isula-build configuration path
ConfigurationPath = ConfigRoot + "configuration.toml"
// RegistryConfigPath describes the config path of registries
RegistryConfigPath = ConfigRoot + "registries.toml"
// SignaturePolicyPath describes the policy path
SignaturePolicyPath = ConfigRoot + "policy.json"
// StorageConfigPath describes the storage path
StorageConfigPath = ConfigRoot + "storage.toml"
// RegistryDirPath is the dir to store registry configs
RegistryDirPath = ConfigRoot + "registries.d"
// AuthFilePath is authentication file used for registry connection
AuthFilePath = ConfigRoot + "auth.json"
// DefaultGRPCAddress is the local unix socket used by isula-builder
DefaultGRPCAddress = "unix:///var/run/isula_build.sock"
// UnixPrefix is the prefix used on defined an unix sock
UnixPrefix = "unix://"
// DefaultDataRoot is the default persistent data root used by isula-builder
DefaultDataRoot = "/var/lib/isula-build"
// DefaultRunRoot is the default run root used by isula-builder
DefaultRunRoot = "/var/run/isula-build"
// DefaultSharedDirMode is dir perm mode with higher permission
DefaultSharedDirMode = 0755
// DefaultSharedFileMode is file perm mode with higher permission
DefaultSharedFileMode = 0644
// DefaultRootFileMode is the default root file mode
DefaultRootFileMode = 0600
// DefaultGroupFileMode is the default root file mode for group usage
DefaultGroupFileMode = 0660
// DefaultRootDirMode is the default root dir mode
DefaultRootDirMode = 0700
// DefaultReadOnlyFileMode is the default root read only file mode
DefaultReadOnlyFileMode = 0400
// DefaultUmask is the working umask of isula-builder as a process, not for users
DefaultUmask = 0022
// CliLogBufferLen is log channel buffer size
CliLogBufferLen = 8
// HostsFilePath is the path of file hosts
HostsFilePath = "/etc/hosts"
// ResolvFilePath is the path of file resolv.conf
ResolvFilePath = "/etc/resolv.conf"
// MaxFileSize is the maximum file size allowed, set 1M
MaxFileSize = 1024 * 1024
// DefaultHTTPTimeout includes the total time of dial, TLS handshake, request, resp headers and body
DefaultHTTPTimeout = 3600 * time.Second
// DefaultFailedCode is the exit code for most scenes
DefaultFailedCode = 1
// DefaultIDLen is the ID length for image ID and build ID
DefaultIDLen = 12
// DefaultCertRoot is path of certification used for registry connection
DefaultCertRoot = ConfigRoot + "certs.d"
// LayoutTime is the time format used to parse time from a string
LayoutTime = "2006-01-02 15:04:05"
// BuildContainerImageType is the default build type
BuildContainerImageType = "ctr-img"
// BufferSize is default buffer size for file transportation
BufferSize = 32 * 1024
// DockerTransport used to export docker image format images to registry
DockerTransport = "docker"
// DockerArchiveTransport used to export docker image format images to local tarball
DockerArchiveTransport = "docker-archive"
// DockerDaemonTransport used to export images to docker daemon
DockerDaemonTransport = "docker-daemon"
// OCITransport used to export oci image format images to registry
OCITransport = "oci"
// OCIArchiveTransport used to export oci image format images to local tarball
OCIArchiveTransport = "oci-archive"
// IsuladTransport use to export images to isulad
IsuladTransport = "isulad"
// ManifestTransport used to export manifest list
ManifestTransport = "manifest"
// DefaultTag is latest
DefaultTag = "latest"
)
var (
// MaskedPaths is the list of paths which should be masked in container
MaskedPaths = []string{
"/proc/acpi",
"/proc/config.gz",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/proc/files_panic_enable",
"/proc/fdthreshold",
"/proc/fdstat",
"/proc/fdenable",
"/proc/signo",
"/proc/sig_catch",
"/proc/kbox",
"/proc/oom_extend",
"/proc/pin_memory",
"/sys/firmware",
"/proc/cpuirqstat",
"/proc/memstat",
"/proc/iomem_ext",
"/proc/livepatch",
"/proc/net_namespace",
}
// ReadonlyPaths is the list of paths which shoud be read-only in container
ReadonlyPaths = []string{
"/proc/asound",
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger",
}
// ReservedArgs is the list of proxy related environment variables
ReservedArgs = map[string]bool{
"http_proxy": true,
"https_proxy": true,
"ftp_proxy": true,
"no_proxy": true,
"HTTP_PROXY": true,
"HTTPS_PROXY": true,
"FTP_PROXY": true,
"NO_PROXY": true,
}
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。