MCPcopy
hub / github.com/iron-io/functions / Dockerpush

Function Dockerpush

fn/common/common.go:247–260  ·  view source on GitHub ↗
(ff *Funcfile)

Source from the content-addressed store, hash-verified

245}
246
247func Dockerpush(ff *Funcfile) error {
248 latestTag := ff.Name + ":latest"
249 cmd := exec.Command("docker", "tag", ff.FullName(), latestTag)
250 cmd.Stderr = os.Stderr
251 cmd.Stdout = os.Stdout
252 if err := cmd.Run(); err != nil {
253 return fmt.Errorf("error tagging latest: %v", err)
254 }
255 cmd = exec.Command("docker", "push", ff.Name)
256 if err := cmd.Run(); err != nil {
257 return fmt.Errorf("error running docker push: %v", err)
258 }
259 return nil
260}
261
262func AppNamePath(img string) (string, string) {
263 sep := strings.Index(img, "/")

Callers

nothing calls this directly

Calls 3

CommandMethod · 0.80
FullNameMethod · 0.80
RunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…