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

@magda/docker-utils

v4.2.4

Published

MAGDA Docker Utilities

Downloads

106

Readme

MAGDA docker-utils

A set of docker commandline toolkits that is used by Magda to build docker images.

Usage

After Adding this package @magda/docker-utils as the devDependencies in your project or installing the package as a global package via npm install --global @magda/docker-utils, you will have command create-docker-context-for-node-component & retag-and-push available when you write scripts for the scripts property of the package.json file.

The two scripts takes both parameters from commandline as well package.json key config.docker.

You can run the script with --help switch to print all available commandline options.

You can also find examples from magda repo.

create-docker-context-for-node-component

> yarn create-docker-context-for-node-component --help
Options:
  --build             Pipe the Docker context straight to Docker.
                                                      [boolean] [default: false]
  --tag               The tag to pass to "docker build".  This parameter is only
                      used if --build is specified.  If the value of this
                      parameter is `auto`, a tag name is automatically created
                      from NPM configuration.         [string] [default: "auto"]
  --repository        The repository to use in auto tag generation. Will default
                      to '', i.e. dockerhub unless --local is set. Requires
                      --tag=auto                                        [string]
  --name              The package name to use in auto tag generation. Will
                      default to ''. Used to override the docker nanme config in
                      package.json during the auto tagging. Requires --tag=auto
                                                                        [string]
  --output            The output path and filename for the Docker context .tar
                      file.                                             [string]
  --local             Build for a local Kubernetes container registry.  This
                      parameter is only used if --build is specified.
                                                      [boolean] [default: false]
  --push              Push the build image to the docker registry.  This
                      parameter is only used if --build is specified.
                                                      [boolean] [default: false]
  --platform          A list of platform that the docker image build should
                      target. Specify this value will enable multi-arch image
                      build.                                            [string]
  --noCache           Disable the cache during the docker image build.
                                                      [boolean] [default: false]
  --cacheFromVersion  Version to cache from when building, using the
                      --cache-from field in docker. Will use the same repository
                      and name. Using this options causes the image to be pulled
                      before build.                                     [string]
  --help              Show help                                        [boolean]

retag-and-push

> yarn retag-and-push --help
Options:
  --version           Show version number                              [boolean]
  --config            Path to JSON config file
  --help              Show help                                        [boolean]
  --fromPrefix        The prefix of the image that will be given a new tag
                                                          [string] [default: ""]
  --fromName          The package name that used to generate the fromTag. Used
                      to optionally override the docker nanme config in
                      package.json during the auto tagging.
                                                          [string] [default: ""]
  --fromVersion       The version of the existing image that will be given a new
                      tag                    [string] [default: "1.1.0-alpha.0"]
  --toPrefix          The prefix for the tag to push to   [string] [default: ""]
  --toName            The package name that used to generate the toTag. Used to
                      optionally override the docker nanme config in
                      package.json during the auto tagging.
                                                          [string] [default: ""]
  --copyFromRegistry  When `copyFromRegistry`=true,
                      [regctl](https://github.com/regclient/regclient) will be
                      used.
                      The image will be copied directly from remote registry to
                      the destination registry rather than from a local image.
                      This allows copying multi-arch image from one registry to
                      another registry.               [boolean] [default: false]
  --toVersion         The version for the tag to push to
                                             [string] [default: "1.1.0-alpha.0"]