I have the following compose file:
services:
web:
build: .
ports:
- "8000:8000"
environment:
DB_HOST: db
db:
image: "postgres"
environment:
POSTGRES_PASSWORD: postgres
Running 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:
|
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.
I have the following compose file:
Running
compose.pull()triggers the following error:I suspect this is related to this piece of code:
dockerode-compose/compose.js
Lines 62 to 69 in 7875946
At line 69, the code assumes there's always an
imageproperty in the service. However, as shown in my compose file, there's no such property in thewebservice.This should be easily fixable by skipping services that don't provide an image.