GithubHelp home page GithubHelp logo

docker-missing-tools's Introduction

Docker Missing Tools

A set of commands to make docker dev-ops easier.

Docker Missing Tools help to automate dev-ops tasks without including noise to source code.

Avoid creating typical helper scripts like "build.sh" and "deploy.sh" inside shared code repositories.

ls

List everything (stacks, services, container, images, volumes) at once:

$ docker_ls

reset

Remove everything (except volumes) at once:

$ docker_reset

init

Initialize a swarm:

$ docker_init

build and deploy

Create an image from your source code (and a Dockerfile) and deploy it (according a docker-stack.yml) with the rest of the stack:

$ docker_build_and_deploy TARGET IMAGE STACK [docker-stack.yml] [Dockerfile]

Arguments description:

  • TARGET: is the directory with the source code to build.
  • IMAGE: is the name for the new image.
  • STACK: is the name for the new stack.
  • docker-stack.yml: (optional) is the YML file where the new stack is defined.
  • Dockerfile: (optional) is the Docker file where the new image is defined (must exist inside TARGET directory).

build and release

Create an image from your source code (and a Dockerfile) and upload it to a Docker registry:

docker_build_and_release TARGET IMAGE VERSION REPOSITORY [Dockerfile]

Arguments description:

  • TARGET: is the directory with the source code to build.
  • IMAGE: is the name for the new image.
  • VERSION: is the tag for the new image.
  • REPOSITORY: is the Docker repository where image will be uploaded to.
  • Dockerfile: (optional) is the Docker file where the new image is defined (must exist inside TARGET directory).

deploy

Deploy an stack (docker-stack.yml):

docker_deploy STACK [docker-stack.yml]

Arguments description:

  • STACK: is the name for the new stack.
  • docker-stack.yml: (optional) is the YML file where the new stack is defined.

logs

Display logs from containers in any status:

docker_logs STACK

Arguments description:

  • STACK: filter containers by stack name.

logs up

Display logs from containers in "running" status:

docker_logs_up STACK

Arguments description:

  • STACK: filter containers by stack name.

logs down

Display logs from containers in "created", "restarting", "removing", "paused", "exited" or "dead" status:

docker_logs_down STACK

Arguments description:

  • STACK: filter containers by stack name.

logs from service

Display logs from dockerd service:

docker_logs_f

Install Docker Missing Tools

Get the scripts and move them to local "bin" directory:

git clone https://github.com/nandoquintana/docker-missing-tools.git ~/docker_missing_tools
cd ~/docker_missing_tools
./docker_missing_tools_install.sh

Update your Docker repositories credentials file:

emacs ~/.docker_missing_tools_repositories

Include your URLs, USERs and PASSs there in .netrc file format. For example:

machine docker.io/my-username
    login my-username
    password my-password

machine my-repository.my-domain.com
    login "[email protected]"
    password my-password

Remember to install Python and Docker CE :-)

Uninstall Docker Missing Tools

cd ~/docker_missing_tools
./docker_missing_tools_uninstall.sh

docker-missing-tools's People

Contributors

nandoquintana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.