Giter VIP home page Giter VIP logo

dkr's Introduction

dkr

What is dkr?

Dkr is a command line (CLI) tool that is a drop-in replacement for docker and docker-compose tools.

What it offers?

Let's say docker CLI interface doesn't provide the best user experience in the world. There are many things to remember, and many traps. Especially for occasional users like me.

This tool adds some handy shortcuts, like for example, instead of writing docker exec -it CONTAINER_NAME /bin/sh you can write dkr sh CONTAINER_NAME. Quick, right?

How it works?

By default, it routes all commands directly to docker cli. For example dkr network ls would directly call docker network ls in your command line.

For convenience it also calls docker-compose when explicitly told by calling dkr c ....

If you write this: dkr i dont know what Im doing it will evaluate to docker i dont know what Im doing.

If dkr recognizes known aliases, it would act accordingly as shown in the dkr sh CONTAINER_NAME example.

Aliases

sh

Enters CONTAINER_NAME sh shell.

dkr sh CONTAINER_NAME

Alias to

docker exec -it CONTAINER_NAME /bin/sh

bash

Enters CONTAINER_NAME bash shell.

dkr bash CONTAINER_NAME

Alias to

docker exec -it CONTAINER_NAME /bin/bash

killall

Kills all running containers.

dkr killall

cleanup

Kills all running containers, removes containers with their images and volumes.

dkr cleanup

nuke

Removes everything. Alias to dkr cleanup and docker system prune --volumes -f. You may ask here, how come we need to remove running containers, images and volumes first, to properly cleanup the environment with docker system prune?

Well, maintainer of this software doesn't know why, but apparently calling docker system prune --volumes when all containers are killed, still leaves some leftovers in the system.

Which brings us to the primary motto of this tool.

dkr nuke

Current state

This software is not ready for usage. It's an early stage. Please wait until 1.0.0.

How to install?

MacOS via homebrew

First, add ohdkr tap

brew tap ohdkr/homebrew-dkr-osx

Then, install dkr

brew install dkr

How to contribute?

Feel free to post any Issue here on github as bug report, comment or suggestion. Pull requests are always welcome, but it might be wise of you to first create an issue so we can talk details.

dkr's People

Contributors

ddebasilio avatar sznowicki avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ddebasilio

dkr's Issues

`dkr nuke`

Description

dkr nuke calls:

  • dkr clean internal routine
  • docker system prune
  • docker system prune --volumes

Try dkr sh when dkr bash fails automatically.

As a user I want dkr to automatically try dkr sh when dkr bash fails due to missing bash in the container.

AC1: When dkr bash ... fails, application tries dkr sh in the same life cycle.
AC2: This try is transparent to the user, before it executed it logs Entering bash failed. Trying with sh.

dkr killall / dkr cleanup

Description

  • dkr killall runs docker kill $(docker ps -q)
  • dkr cleanup runs:
    -- docker kill $(docker ps -q)
    -- docker rm $(docker ps -a -q)
    -- docker rmi $(docker images -q)

Make code coverage better.

Code coverage should reach 100% for all relevant lines, so it acts as a smoke test for future pull requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.