https://github.com/thenets/cli-in-container
Example of a CLI that must exist only inside a container
https://github.com/thenets/cli-in-container
Last synced: 8 months ago
JSON representation
Example of a CLI that must exist only inside a container
- Host: GitHub
- URL: https://github.com/thenets/cli-in-container
- Owner: thenets
- Created: 2023-02-07T20:46:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T20:47:19.000Z (over 3 years ago)
- Last Synced: 2025-02-14T21:46:55.613Z (over 1 year ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cli-in-container
This is a simple example of how to create a CLI that creates commands to invoke itself in a container.
## Use-case
- It's not possible to install the CLI on the host machine
- Must be east-to-use
## Process call order
1. (Host) User invokes the `run.sh` script, which invoke container's `/app/wrapper.sh` script
2. (Container) `/app/wrapper.sh` returns the full command, including speciall args like volume mapping, environment variables, etc.
3. (Host) The `run.sh` script executes the full command, which invokes the container's `/app/cli.sh` script
4. (Container) `/app/cli.sh` executes the command