Fix service port mappings when input is undefined, null, or empty (#60)
* fix: service without ports defined * fix port mappings when ports are undefined,null or empty * fix Co-authored-by: Ronald Claveau <[email protected]>
This commit is contained in:
co-authored by
Ronald Claveau
parent
bf39b9bf16
commit
4448b61e00
@@ -125,10 +125,9 @@ function generateResponseFile(
|
||||
)
|
||||
if (serviceContainers?.length) {
|
||||
response.context['services'] = serviceContainers.map(c => {
|
||||
if (!c.ports) {
|
||||
return
|
||||
if (!c.ports?.length) {
|
||||
return { image: c.image }
|
||||
}
|
||||
|
||||
const ctxPorts: ContextPorts = {}
|
||||
for (const port of c.ports) {
|
||||
ctxPorts[port.containerPort] = port.hostPort
|
||||
|
||||
Reference in New Issue
Block a user