Skip to content

Commit

Permalink
port from #307 and #308
Browse files Browse the repository at this point in the history
Co-authored-by: chaya2z <taisuke.nakano@chaya2z.com>
  • Loading branch information
fujiwara and chaya2z committed Aug 10, 2023
1 parent 7a48957 commit 485e089
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions create.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func (app *App) prepareFunctionCodeForDeploy(opt DeployOption, fn *FunctionV2) e
}
// deploy docker image. no need to preprare
log.Printf("[info] using docker image %s", *fn.Code.ImageUri)

if fn.ImageConfig == nil {
fn.ImageConfig = &lambdav2types.ImageConfig{} // reset explicitly
}
return nil
}

Expand Down
9 changes: 9 additions & 0 deletions lambroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ func newFunctionFromV2(c *lambdav2types.FunctionConfiguration, code *lambdav2typ
Variables: e.Variables,
}
}
if i := c.ImageConfigResponse; i != nil {
if ic := i.ImageConfig; ic != nil {
fn.ImageConfig = &lambdav2types.ImageConfig{
Command: i.ImageConfig.Command,
EntryPoint: i.ImageConfig.EntryPoint,
WorkingDirectory: i.ImageConfig.WorkingDirectory,
}
}
}
for _, layer := range c.Layers {
fn.Layers = append(fn.Layers, *layer.Arn)
}
Expand Down

0 comments on commit 485e089

Please # to comment.