5.2.0 • Published 4 months ago

@lifeomic/test-tool-docker v5.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@lifeomic/test-tool-docker

npm Build Status

Convenience methods for interacting with Docker

executeContainerCommand pullImage imageExists ensureImage getHostAddress

Container

executeContainerCommand

Executes the container with several convenience options.

ExecuteCommandConfigDescription
containerA dockerode container
commandThe command to be sent to the container
environmentenvironment variables to be sent to the container. Should be in the format ENV_NAME=ENV_VALUE
stdin?If set then the string is sent as an end command to the container stream

Image

pullImage

Pulls the image into the current Docker environment

argDescription
dockerA dockerode instance
imageThe image to be pulled. <image-name>[:<tag>]

imageExists

Returns if the image exists in the local docker environment.

argDescription
dockerA dockerode instance
imageThe image to be checked. <image-name>[:<tag>]

ensureImage

Will pull the image from the remote repository if it isn't already present locally.

argDescription
dockerA dockerode instance
imageThe image to be checked. <image-name>[:<tag>]

Utility methods

getHostAddress

Will return the Docker host address.

If process.env.DOCKER_HOST_ADDR is set, then that value will be returned.

When running on MacOS and require('os').type() === 'Darwin' then '127.0.0.1' will be returned.

Otherwise, we will start up an alpine image and return the default inet address.

dockerode

5.2.0

4 months ago

5.1.1

4 months ago

5.1.0

8 months ago

5.0.0

8 months ago

4.1.3

11 months ago

4.1.2

1 year ago

4.1.1

1 year ago

4.1.0

1 year ago

3.3.1

2 years ago

4.0.0

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

1.2.0

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago