From dcec55bced6fd5c328fdb70b884e29a794aa8966 Mon Sep 17 00:00:00 2001 From: kitherill Date: Tue, 12 Aug 2025 22:27:08 +0300 Subject: [PATCH 1/2] Docker setup for gem build and installation --- Dockerfile | 3 +++ README.md | 29 +++++++++++++++++++++++++++++ ey-core.gemspec | 10 +++++++--- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e4cc9a --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index d42ba64..66df1cb 100644 --- a/README.md +++ b/README.md @@ -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=https://api-meta.engineyard.com +export CORE_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. diff --git a/ey-core.gemspec b/ey-core.gemspec index d6d50a5..cea183e 100644 --- a/ey-core.gemspec +++ b/ey-core.gemspec @@ -25,7 +25,7 @@ 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" @@ -33,14 +33,18 @@ Gem::Specification.new do |gem| 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" From 01cba598100643cee8da55592d9f1aab3a686e48 Mon Sep 17 00:00:00 2001 From: kitherill Date: Tue, 12 Aug 2025 22:32:34 +0300 Subject: [PATCH 2/2] Readme update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66df1cb..a92c5d1 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ 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=https://api-meta.engineyard.com -export CORE_TOKEN= +export CORE_URL= +export CORE_TOKEN= ``` 4. Now you can use the ey-core CLI: