New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docker-sidecar

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-sidecar - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

21

bin/sidecar.js

@@ -13,3 +13,3 @@ #!/usr/bin/env node

dir: undefined,
auth: {
auths: {
consul: {

@@ -19,4 +19,8 @@ token: undefined

docker: {
email: undefined,
auth: undefined
'index.docker.io': {
email: undefined,
auth: undefined,
username: undefined,
password: undefined
}
}

@@ -42,2 +46,5 @@ }

* note that consul does not like starting prefixes with a '/'
Config:
${cfg}
`;

@@ -75,3 +82,3 @@

promisify: Bluebird.fromCallback,
token: cfg.auth.consul.token
token: cfg.auths.consul.token
});

@@ -86,3 +93,3 @@ const consul = new Consul(consulOpts);

docker: docker,
dockerAuth: cfg.auth.docker,
dockerAuth: cfg.auths.docker,
dir: cfg.dir

@@ -92,3 +99,3 @@ });

puller.watch.on('error', function (err) {
log.error({error: err}, 'watch error');
log.error({err: err}, 'watch error');
});

@@ -106,3 +113,3 @@

puller.docker.on('finish', function (output) {
log.info({final_status: output.slice(-1)}, 'docker finished');
log.info({finalStatus: output.slice(-1)}, 'docker finished');
});

@@ -109,0 +116,0 @@

@@ -7,3 +7,4 @@ 'use strict';

const promisifyAll = Bluebird.promisifyAll;
const method = require('bluebird').method;
const assert = require('assert');
const method = Bluebird.method;

@@ -32,3 +33,3 @@ const sidecar = method(function (opts) {

if (!maybe_kv) {
return;
return;
}

@@ -39,4 +40,7 @@ const keyval = [].concat(maybe_kv);

for (let image of images) {
const stream = yield docker.pullAsync(image, { authconfig: dockerAuth });
docker.modem.followProgress(stream, onFinished, onProgress);
const registries = Object.keys(dockerAuth).filter((registry) => image.indexOf(registry) === 0);
assert(registries.length <= 1);
debug('using auth', dockerAuth[registries[0]]);
const stream = yield docker.pullAsync(image, { authconfig: dockerAuth[registries[0]] });
docker.modem.followProgress(stream, onFinished, onProgress);
}

@@ -43,0 +47,0 @@ } catch (err) {

{
"name": "docker-sidecar",
"version": "1.0.0",
"version": "1.1.0",
"description": "Watch a consul kv dir for changes to retrieve a list of images and tags and pull them into docker when kv prefix changes.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,5 +6,6 @@ # SYNOPSIS

# USAGE
- Install: `npm i -g docker-sidecar`
- Run: `sidecar --consul http://127.0.0.1 --dir 'test/images'`
- Also useable as a library via `npm i docker-sidecar` or as a Docker image.
Also useable as a library via `npm i docker-sidecar`.
# EXAMPLE

@@ -11,0 +12,0 @@ [![ScreenShot](https://i.imgur.com/TgL9hQO.png?1)](https://i.imgur.com/TgL9hQO.png?1)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc