Documentation ¶
Index ¶
- Constants
- Variables
- func CopyFile(srcFile, destFile string) (int64, error)
- func CreateSecretAsNjaci() (user, pwd string)
- func GetImageName(path string) (string, error)
- func GetModelArtsConfWithPlatform(platform string) (*config.Conf, error)
- func SendRequest(method, url string, in io.Reader, Platform string) (*[]byte, error)
- func SignClient(r *http.Request, Platform string) (*http.Client, error)
- type AuthInfo
- type CreateSecretResponse
- type Docker
- func (d *Docker) BuildImage(warName, image string) error
- func (d *Docker) Images(opt types.ImageListOptions) ([]types.ImageSummary, error)
- func (d *Docker) ImportImage(name, tag, path string) error
- func (d *Docker) LoadImage(path string) error
- func (d *Docker) PullImage(name string) error
- func (d *Docker) PushImage(image string, user, pwd, address string) error
- func (d *Docker) RemoveDanglingImages() error
- func (d *Docker) RemoveImage(name string) error
- func (d *Docker) SaveImage(ids []string, path string) error
- func (d *Docker) SearchImage(name string) ([]registry.SearchResult, error)
- func (d *Docker) TagImage(source, target string) error
- type Manifest
Constants ¶
View Source
const (
NajsciSwrEndpoint = "https://swr-api.cn-east-293.njaci.cn/v2/manage/utils/secret"
)
Variables ¶
View Source
var C config.Config
View Source
var FileName string
Functions ¶
func CreateSecretAsNjaci ¶
func CreateSecretAsNjaci() (user, pwd string)
容器镜像服务->生成临时登录指令 https://swr-api.cn-east-293.njaci.cn/v2/manage/utils/secret
func GetImageName ¶
func SendRequest ¶
Types ¶
type CreateSecretResponse ¶
type Docker ¶
1.Docker docker client
func (*Docker) BuildImage ¶
Buildimage build image image 需要构建的镜像名称
func (*Docker) Images ¶
func (d *Docker) Images(opt types.ImageListOptions) ([]types.ImageSummary, error)
Images get images from
func (*Docker) ImportImage ¶
ImportImage import image
func (*Docker) RemoveDanglingImages ¶
RemoveDanglingImages remove dangling images <none>
func (*Docker) RemoveImage ¶
RemoveImage remove image 这里需要注意的一点就是移除了镜像之后, 会出现<none>:<none>的标签,这个是因为下载的镜像是分层的,所以删除会导致
func (*Docker) SearchImage ¶
func (d *Docker) SearchImage(name string) ([]registry.SearchResult, error)
SearchImage search images
Click to show internal directories.
Click to hide internal directories.