Skip to content

Commit

Permalink
feat: add support for Entrypoint definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Feb 12, 2024
1 parent f163a19 commit 3908d5f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions core/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ func BuildContainerfile(recipe *api.Recipe, cmds []ModuleCommand) error {
}
}

// ENTRYPOINT
if len(recipe.Entrypoint) > 0 {
_, err = containerfile.WriteString(
fmt.Sprintf("ENTRYPOINT %s\n", strings.Join(recipe.Entrypoint, " ")),
)
if err != nil {
return err
}
}

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ require (
github.com/google/uuid v1.3.0
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/vanilla-os/vib/api v0.0.0-20240111183855-a5b5bb7ee570
github.com/vanilla-os/vib/api v0.0.0-20240212085722-f163a19e5a63
gopkg.in/yaml.v3 v3.0.1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/vanilla-os/vib/api v0.0.0-20240111183855-a5b5bb7ee570 h1:aiOXxVBLnmRa9u92+qiTH/DKKwPk7de6ojNGgQYZUaE=
github.com/vanilla-os/vib/api v0.0.0-20240111183855-a5b5bb7ee570/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
github.com/vanilla-os/vib/api v0.0.0-20240212085722-f163a19e5a63 h1:WwnKmkEFT0nQgVTTdEoeSQga4ozVq/bMdoPQUOFeYc0=
github.com/vanilla-os/vib/api v0.0.0-20240212085722-f163a19e5a63/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down

0 comments on commit 3908d5f

Please sign in to comment.