-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I have the following compose file:
services:
web:
build: .
ports:
- "8000:8000"
environment:
DB_HOST: db
db:
image: "postgres"
environment:
POSTGRES_PASSWORD: postgresRunning compose.pull() triggers the following error:
node_modules/dockerode/lib/util.js:48
var digestPos = input.indexOf('@');
^
TypeError: Cannot read properties of undefined (reading 'indexOf')
at module.exports.parseRepositoryTag (node_modules/dockerode/lib/util.js:48:25)
at Docker.pull (node_modules/dockerode/lib/docker.js:1457:23)
at Compose.pull (node_modules/dockerode-compose/compose.js:69:41)
I suspect this is related to this piece of code:
Lines 62 to 69 in 7875946
| async pull(serviceN, options) { | |
| options = options || {}; | |
| var streams = []; | |
| var serviceNames = (serviceN === undefined || serviceN === null) ? tools.sortServices(this.recipe) : [serviceN]; | |
| for (var serviceName of serviceNames) { | |
| var service = this.recipe.services[serviceName]; | |
| try { | |
| var streami = await this.docker.pull(service.image); |
At line 69, the code assumes there's always an image property in the service. However, as shown in my compose file, there's no such property in the web service.
This should be easily fixable by skipping services that don't provide an image.
K0rdan
Metadata
Metadata
Assignees
Labels
No labels