Giter Site home page Giter Site logo

container-cli's Introduction

introduction

When we initialize a container, if we accidentally make a port mapping mistake, we need to rebuild the container or modify the docker configuration file manually.
This tool is designed to automate the process of modifying docker configuration files.

demo

This demo shows how container-cli can modify the port mapping of a container named python

admin@ubuntuyyy:~$ cc  #short of container-cli
current user is not root
? confirm close docker? Yes
INFO     | container_cli:__close_docker:17 - closing docker
0 Warning: Stopping docker.service, but it can still be activated by:
  docker.socket
? Please input container name: python
Please enter ALL host ports and their corresponding ports in the container one by one
? Please input host port, empty to exit 23
? Please input container port, empty to exit 22
? Please input host port, empty to exit
? confirm? Yes
INFO     | container_cli.change_ports:change_ports:59 - finished
docker restarted, please restart your container

installation

step1 install pipx

By default, ubuntu doesn't have a way to install pipx using pip, so we have to:

sudo apt-get update && sudo apt-get install pipx && pipx ensurepath

After that we need to shut down the terminal and reenter it (or just reboot)

step2 install container-cli

pipx install container-cli

usage

Type cc or container_cli on the command line to start, and follow the prompts.

Star History

Star History Chart

container-cli's People

Contributors

yixinnb avatar

Stargazers

 avatar  avatar

Watchers

 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.