task: add new task for build unpacker image
This commit is contained in:
parent
c9e3696ffd
commit
2839a68c6a
30
go/repositories/unpacker/build_docker_image.go
Normal file
30
go/repositories/unpacker/build_docker_image.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package unpacker
|
||||||
|
|
||||||
|
import (
|
||||||
|
"ocl/portainer-devtool/configs"
|
||||||
|
"ocl/portainer-devtool/tasks/common"
|
||||||
|
"ocl/portainer-devtool/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BuildDockerImageSubTask struct {
|
||||||
|
common.GeneralTask
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewBuildDockerImageSubTask(cfg *configs.Config) *BuildDockerImageSubTask {
|
||||||
|
return &BuildDockerImageSubTask{
|
||||||
|
GeneralTask: *common.NewGeneralTask(cfg),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (task *BuildDockerImageSubTask) Execute() error {
|
||||||
|
utils.SuccessPrint(`
|
||||||
|
docker image tag docker.io/portainer/compose-unpacker:latest oscarzhou/compose-unpacker:28
|
||||||
|
docker image push oscarzhou/compose-unpacker:28
|
||||||
|
`)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (task *BuildDockerImageSubTask) String() string {
|
||||||
|
return "Build Docker Image"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user