How to pull signed docker images using dockerode NodeJS API

I have a node js application that does basic docker operations like pull images, create, run, start and stop docker containers. I am using dockerode library.
I want to enforce only trusted signed images are allowed to be pulled.
According to docker documentation, setting env variable DOCKER_CONTENT_TRUST=1. This is not feasible because I am invoking docker remotely.

Observation on command line: Without setting DOCKER_CONTENT_TRUST=1, using flag –disable-content-trust=false will force only trusted images to be downloaded.

  • Deploy NWJS with docker
  • Accessing vagrant provider docker from vagrant virtualbox
  • Docker cannot overwrite bind mounted(-v) FILE
  • Flask-Babel won't translate text on AWS within a docker container, but does locally
  • Docker container with ASP.NET Core libraries
  • Cannot attach debugger to a node.js application running inside a Docker container in host-mode
  • [root@vm ~]# echo $DOCKER_CONTENT_TRUST
    [root@vm ~]# docker pull --disable-content-trust=false docker/trusttest
    Using default tag: latest
    no trust data available
    [root@vm ~]# 

    But, this is no effect when called from node js using dockerode api

    Here is the node code:

    function pullImage(imageId){
        return new Promise((resolve, reject)=>{
                    console.error("Docker pull failed for:" + imageId + "error:" + err);
                    console.log("Docker image installed: " + imageId);
        console.log("pull image successful", v);
        console.error("exception in pull image", ex);

    This code downloads the image even though disable-content-trust=false.
    The question is am I passing the option parameters to docker.pull correctly ?
    I can’t find the documentation for option parameter values for dockerode.
    Any help is much appreciated.


  • Google Container Registry access denied when pushing docker container
  • CoreOS & HDFS - Running a distributed file system in Linux Containers/Docker
  • How to have bash script answer interactive prompts (no y/n only)?
  • Dockerfile: How to replace a placeholder in environment variable with build-arg's?
  • How to restore a redis backup in a redis container?
  • Network slowness between Docker container and localhost
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.