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

@yvnbunag/dock

v1.0.4

Published

A CLI tool to help manage and consume development environments containerized with docker

Downloads

19

Readme

@yvnbunag/dock

@yvnbunag/dock

npm version nodejs version codecov npms.io (quality) Known Vulnerabilities Continuous Integration Continuous Delivery license

A CLI tool to help manage and consume development environments containerized with docker and configured with docker-compose


Contents


When would I use dock?

  • If you need to manage your containerized development environment globally
  • If you need ease when managing your containers via CLI only due to limited development machine resources
    • When having to bring up or down specific containers for services currently being developed
    • When occasionally running commands in a container, without having to remember the engine command and options needed

What docker orchestration engines are currently supported?

Only docker-compose. Other engines may be readily supported


Requirements

  1. Docker (for Linux) version 19.03 or higher
  2. Docker Compose version 1.27 or higher

Installation

Globally with npm

npm install -g @yvnbunag/dock

Globally with yarn

yarn global add @yvnbunag/dock

Configuration

Before a project may be registered and used with dock, a dock configuration (dock.config.yml) must be present in the project directory, along with the docker-compose configuration

See Configuration Reference

name: library-system

containers:
  nginx:
    shell: sh
  mysql: {}
  node16:
    shell: sh

services:
  library-system:
    container: node16
    entry-point: ./applications/library-system
    install:
      - yarn
      - cp /shared/applications/library-system/.env .env
  library-system-api:
    container: node16
    entry-point: ./microservices/library-system-api
    install:
      - yarn
      - cp /shared/microservices/library-system-api/.env .env
      - yarn database:sync
      - yarn database:seed

modes:
  front-end:
    containers:
      - nginx
    services:
      - library-system
  back-end:
    containers:
      - nginx
      - mysql
    services:
      - library-system-api
  full-stack:
    containers:
      - nginx
      - mysql
    services:
      - library-system
      - library-system-api

Usage

Listed below are the commands to help you manage your development environments. You may use the built in help command for additional options and information

dock --help

# Or for specific commands
dock [command] --help

The dock command may be invoked without a sub command. See [root] command usage reference


completion

Show instructions to enable/disable dock completion

Enable completion

dock completion enable

Enable completion

Disable completion

dock completion disable

Disable completion


register

Register project

Register current directory

dock register

Register current directory

Register provided path to directory

dock register [path]

Register provided directory


projects

List registered projects

dock projects

List projects


use

Activate project for usage when invoking docker abstraction engine commands

dock use [project]

Use project


build

Build container/s or service container/s

Build all containers

dock build

Build all containers

Build specific container/s or service container/s

dock build [reference...]

Build specific references


install

Run install script/s for services

Run all install scripts

dock install

Build all containers

Run install scripts of specific service/s

dock install [service...]

Build specific references


up

Bring container/s or service container/s up

Bring up all containers

dock up

Bring up all containers

Bring up specific container/s or service container/s

dock up [reference...]

Bring up specific references


down

Stop and remove container/s or service container/s

Bring down all containers

dock down

Bring down all containers

Bring down specific container/s or service container/s

dock down [reference...]

Bring down specific references


mode

Switch running containers with provided mode container/s and service container/s

dock mode [mode...]

Switch to mode


open

Open interactive shell of container or service container

Open container

dock open [container]

Open container

Open service container

dock open [service]

Open service container


run

Run command in container or service container

Run command in container

dock run [container] [command...]

Run command in container

Run command in service container

dock run [service] [command...]

Run command in service container


[root]

Given that the first argument is not a command and current directory is a service reference:

  • Open interactive shell of service container if no arguments are provided
  • Run command in service container if arguments are provided

Open service container

dock

Open service container

Run command in service container

dock [service-command...]

Run command in service container


reload

Reload used project

dock reload

Reload used project

Command not needed to be used for every new change in the configuration file as project gets automatically reloaded every time a orchestration engine command is invoked


unregister

Unregister project

dock unregister [project]

Unregister project


Example Projects

See Library System Stack repository for example configuration and usage


Contributing

See Contributing Guide


Exit Codes

See Exit Codes Reference


Repository

See Repository