Skip to content

Docker config for CLI #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ruby:2.5.8
WORKDIR /app
CMD gem build ey-core.gemspec && gem install ey-core-*.gem && ey-core help && bash
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,35 @@ Like the `git` command, `ey-core` is like a gateway to other commands.

Rather than attempting to provide an exhaustive writeup of all of the commands provided by `ey-core`, this document will instead describe what are likely the most common use cases and leave you to read up on the remainder via the `help` command.

#### Docker-based setup ####

You can use Docker to work with the `ey-core` CLI app. Here's how to set it up:

1. Build the Docker image:

```bash
docker build --platform linux/amd64 -t ey-core-cli .
```

2. Run the Docker container with your local directory mounted:

```bash
docker run --platform linux/amd64 -v $(pwd):/app -it ey-core-cli
```

3. Inside the container, set up authentication via environment variables:

```bash
export CORE_URL=<core api url>
export CORE_TOKEN=<core api token>
```

4. Now you can use the ey-core CLI:

```bash
ey-core help
```

#### Use Case: Getting Help ####

Arguably the most important command in the app is `ey-core help`. Given no arguments, it provides the list of second-level commands avaiable for use. From that point, each argument is expected to be a command from the next level of the hierarchy.
Expand Down
10 changes: 7 additions & 3 deletions ey-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@ Gem::Specification.new do |gem|
gem.add_dependency "amazing_print", "~> 1.1.0"
gem.add_dependency "belafonte"
gem.add_dependency "cistern", "~> 0.12.3"
gem.add_dependency "colorize"
gem.add_dependency "colorize", "0.8.1"
gem.add_dependency "ey-hmac", "~> 2.0"
gem.add_dependency "escape"
gem.add_dependency "hashie", "~> 4.1.0"
gem.add_dependency "faraday", "~> 1.0.1"
gem.add_dependency "faraday_middleware", "~> 1.0.0"
gem.add_dependency "rack"
gem.add_dependency "faye"
gem.add_dependency "highline"
gem.add_dependency "highline", "2.1.0"
gem.add_dependency "json", "~> 2.3.0"
gem.add_dependency "mime-types"
gem.add_dependency "oj"
gem.add_dependency "oj", "3.14.2"
gem.add_dependency "oj_mimic_json"
gem.add_dependency "pry"
gem.add_dependency "sshkey", "~> 1.6"
gem.add_dependency "table_print"
gem.add_dependency "io-console", "0.5.9"
gem.add_dependency "reline", "0.3.1"
gem.add_dependency "multi_json", "1.15.0"
gem.add_dependency "public_suffix", "4.0.7"

gem.add_development_dependency "pry-nav"
gem.add_development_dependency "rspec", "~> 3.0"
Expand Down