Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
docker-sidecar
Advanced tools
Watch a consul kv dir for changes to retrieve a list of images and tags and pull them into docker when kv prefix changes.
Sidecar watches a list of images from consul kv via a key prefix. The value for each key under the prefix should be a string e.g., "image:tag"
and sidecar will pull those images automatically into docker.
npm i -g docker-sidecar
sidecar --consul http://127.0.0.1:8500 --dir 'test/images'
npm i docker-sidecar
or as a Docker image.--bootstrap
option and pass a path to a file with images to download at startup.
sidecar --consul http://127.0.0.1:8500 --dir 'test/images' --bootstrap /path/to/bootstrap.json
If using a private registry or a private docker image, sidecar
uses the standard ~/.docker/config.json
location for auth credentials.
For consul auth, you can use the env variable sidecar_auths__consul__token=token
.
Included is a docker-compose.yml
to serve as a starting point for a set of services. This includes consul, registrator, and the sidecar service all setup for you automatically via compose.
The example runs sidecar with the option --dir test/images
which means it will watch the consul kv key prefix for changes.
Simply add a new consul key e.g., test/images/foo
with value busybox:latest
and hit update in consul (located @ HOST_IP
or docker-machine ip default
) and that image will be pulled into the configured docker.
start up our sidecar service
$ docker-compose -p sidecar build
$ docker-compose -p sidecar up
make sure we've got the latest busybox/ubuntu in docker/swarm :
$ curl -X PUT -d 'busybox:latest' http://$HOST_IP:8500/v1/kv/test/images/busybox
$ curl -X PUT -d 'ubuntu:latest' http://$HOST_IP:8500/v1/kv/test/images/ubuntu
refresh the busybox image again (imagine a webhook writing these eventually):
$ curl -X PUT -d 'busybox:latest' http://$HOST_IP:8500/v1/kv/test/images/busybox
FAQs
Watch a consul kv dir for changes to retrieve a list of images and tags and pull them into docker when kv prefix changes.
The npm package docker-sidecar receives a total of 3 weekly downloads. As such, docker-sidecar popularity was classified as not popular.
We found that docker-sidecar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.