Skip to content

vitaly-om/docker-command-tool

Repository files navigation

Build Status

docker-command-tool

It is simple wrapper around docker. It makes possible to create some cli in your project (building static, generating protobuf, etc.).

Example of using:

$ pip install bagga
$ bagga some_command

Make sure pip is new (19.1.1 is ok, 9.0.1 is not ok) to make console_scripts entrypoint working.

Example of dct.yaml:

containers:
  static-container: |
    FROM node:10
    RUN echo 'some actions'
    
  app-container: |
    FROM python:3.6.6-stretch
    WORKDIR workdir
    COPY server .
    RUN pip install -r requirements

commands:
  build-js:
    container: static-container
    volumes:
      $(pwd):/opt/project
    cmd: |
      echo 'building js'
      echo 'ok'

  build-css:
      container: static-container
      cmd: |
        echo 'building css'
        echo 'ok'

  run:
    container: app-container
    volumes:
      /your-machine/verywow:/docker/verywow
    ports:
      5000:5000
    envs:
      MY_SUPREME_ENV='my_env'
    cmd: |
      FLASK_APP=run.py python -m flask run

Run:

$ bagga build-css

bagga params

Command Description
-d [--docker-commands] '{commands}' Add custom docker commands for docker run
-c [--config] '{config_path}' Use custom config file instead of dct.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages