Skip to main content

Running Docker in a new process and creating a container.


Go to the directory using the cd command.  In this instance in the sites directory:

cd ~/Sites

Create a new directory, which can be achieved using mkdir

mkdir mydir

If Docker has been installed then the next command will be all that is required



Not quite

However, this might not be what happens.  On my first run I received the following error message:

  throw err;

Error: Cannot find module 'js-yaml'
Require stack:
- /Users/{yourname}/Sites/icon-proxy/tools/installer/src/file-generator.js
- /Users/{yourname}/Sites/icon-proxy/tools/installer/src/main.js
- /Users/{yourname}/Sites/icon-proxy/tools/installer/bin/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/{yourname}/Sites/icon-proxy/tools/installer/src/file-generator.js:2:14)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19) {
  requireStack: [


The issue with this error is the js-yaml module missing.  Begin by adding the module through using either

sudo npm i -g js-yaml


sudo npm install -g js-yaml

Running one of the commands above could work as hoped and you will see something liek

added 2 packages, and audited 3 packages in 2s

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 7.7.6 -> 7.9.0
npm notice Changelog:
npm notice Run npm install -g npm@7.9.0 to update!
npm notice 



Hmmm, npm being used is out of date.  Not a deal breaker, however lets quickly get rid of this error.  Check the current version

npm -v


Time to update

npm install -g npm@7.9.0

changed 14 packages, and audited 253 packages in 2s

Check the npm version

npm -v


Issue fixed.  Now back to the js-yaml issue.


js-yaml issue

As js-yaml has been installed, what happens now if we run the devcontainer command?

Unfortunately the same error as noted at the start remains.

Needed to create a package.json file that has at least the following:

"dependencies": {
"chalk": "^3.0.0",
"js-yaml": "^3.14.1",
"prompt": "^1.0.0",
"select-shell": "^1.1.3",
"xml-js": "^1.6.11"
"bin": {
"devcontainer": "./bin/index.js"

Save and run npm i to check that the dependancies have been installed.