4.4.3 • Published 2 years ago

@hackbg/dokeres v4.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@hackbg/dokeres

Wanna run something from Node in a reproducible environment? Docker's your friend, but dockerode's API is a little rough around the edges.

This package defines the Dokeres, DokeresImage and DockeresContainer classes. Use DockerImage to make sure a specified Docker Image exists on your system, pulling or building it if it's missing.

Request the same image to be built multiple times and it's smart enough to build it only once. This lets you e.g. launch a zillion dockerized tasks in parallel, while being sure that the same Docker image won't be pulled/built a zillion times.

Reexports Docker from dockerode for finer control.

Example

await new Dokeres().image(
  'my-org/my-build-image:v1', // tries to pull this first
  '/path/to/my/Dockerfile',   // builds from this manifest if pull fails
).run(                                              // docker run                           \
  'build-my-thing', {                               //   --name build-my-thing              \
     readonly: { '/my/project/sources':   '/src'  } //   -v /my/project/sources:/sources:ro \
     writable: { '/my/project/artifacts': '/dist' } //   -v /my/project/sources:/sources:rw \
  }                                                 //   my-org/my-build-image:v1
)
4.4.1

2 years ago

4.4.0

2 years ago

4.4.3

2 years ago

4.4.2

2 years ago

4.0.5

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.3.0

2 years ago

4.1.2

2 years ago

4.0.3

2 years ago

4.2.0

2 years ago

4.1.1

2 years ago

4.0.2

2 years ago

3.0.0

2 years ago

1.0.5

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago