MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / ImageBuild

Method ImageBuild

agent/app/api/v2/image.go:77–89  ·  view source on GitHub ↗

@Tags Container Image @Summary Build image @Accept json @Param request body dto.ImageBuild true "request" @Success 200 {string} log @Security ApiKeyAuth @Security Timestamp @Router /containers/image/build [post] @x-panel-log {"bodyKeys":["name"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"构建镜像 [

(c *gin.Context)

Source from the content-addressed store, hash-verified

75// @Router /containers/image/build [post]
76// @x-panel-log {"bodyKeys":["name"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"构建镜像 [name]","formatEN":"build image [name]"}
77func (b *BaseApi) ImageBuild(c *gin.Context) {
78 var req dto.ImageBuild
79 if err := helper.CheckBindAndValidate(&req, c); err != nil {
80 return
81 }
82
83 if err := imageService.ImageBuild(req); err != nil {
84 helper.InternalServer(c, err)
85 return
86 }
87
88 helper.Success(c)
89}
90
91// @Tags Container Image
92// @Summary Pull image

Callers

nothing calls this directly

Calls 1

ImageBuildMethod · 0.65

Tested by

no test coverage detected