npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

docker-compose-image-updater

v1.0.3

Published

Easily update a docker-compose.yml files images

Downloads

5

Readme

Docker Compose Image Updater

A simple and effective way to update image paths in an existing docker-compose.yml file.

Maintaining a large docker compose file can be tedious. If you have a team of developers or have several VM's with a similiar docker compose file but with different environment variables, using this tool you can easily update only the image paths in a large docker-compose.yml file.

Installation

npm i docker-compose-image-updater -g

Usage

$> dciu --help

Usage: dciu [options]

Options:
  -v, --version              print dciu version
  -u, --update-file          YAML or JSON update file to pass in
  -y, --yaml-file            YAML file to update, typically a docker-compose.yml file
  -o, --omit-backup          Do not produce a backup of the original file. Default is to backup the file e.g. docker-compose.yml.1558044602.backup

Update file

The update file is a simple one-to-one mapping. The "service" name mapped to the docker "image". Below are examples files in YAML and in JSON.

--update-file YAML file syntax

Example images-to-update.yml file:

service1: nginx:1.16
service2: mysql:8.0
service3: hello-world:latest

--update-file JSON file syntax

Example images-to-update.json file:

{
    "service1": "nginx:1.16",
    "service2": "mysql:8.0",
    "service3": "hello-world:latest"
}

Commands

This command will update a docker-compose.yml file images with new images and create a backup of the old docker compose file.

$> dciu -u images-to-update.yml -y docker-compose.yml

Created backup file "docker-compose.yml.1558053560.backup"
Updated "docker-compose.yml" with new values

To omit a backup, use the -o argument:

$> dciu -u images-to-update.yml -y docker-compose.yml -o

Updated "docker-compose.yml" with new values