diff --git a/Dockerfile b/Dockerfile index c7b471c..bfef6c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ LABEL name="emasser" \ # Set the base directory that will be used from now on WORKDIR /emasser -# Copy - source (.) destination (.) - # Install dependency RUN gem install bundler -v '2.3.5' RUN apt update && apt install -y build-essential @@ -29,6 +27,8 @@ RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem RUN mv emasser*.gem gems/emasser.gem FROM ruby:2-alpine + +# Use the line below when testing creating the container locally # RUN sed -i 's/https/http/g' /etc/apk/repositories COPY --from=build /emasser/gems /emass-gems diff --git a/Gemfile.lock b/Gemfile.lock index 4736f84..194d065 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - emasser (1.0.1) + emasser (1.0.3) activesupport (~> 6.1.4) colorize (~> 0.8.1) dotenv (~> 2.7.6) @@ -12,7 +12,7 @@ PATH PATH remote: emass_client/ruby_client specs: - emass_client (1.0.1) + emass_client (1.0.3) json (~> 2.1, >= 2.1.0) typhoeus (~> 1.0, >= 1.0.1) diff --git a/README.md b/README.md index 8e8f832..cddf5f6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ ![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/mitre/emasser?label=Release%20Version) [![Gem Version](https://badge.fury.io/rb/emasser.svg)](https://badge.fury.io/rb/emasser) -
+ + ![emasser Testing](https://github.com/mitre/emasser/actions/workflows/test-cli.yml/badge.svg) ![CodeQL Vulnerabilities and Errors](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml/badge.svg) ![Docs Generation](https://github.com/mitre/emasser/actions/workflows/generate_docs.yml/badge.svg) @@ -90,11 +91,23 @@ bundle exec exe/emasser [command] ``` ## Using Docker -### Run the emasser Docker Container (--rm remove the container when exit) +### Run the emasser Docker Container - To run the emasser container use: ``` docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest ``` +- To run the emasser container in a `Windows terminal (cmd)` use: + ``` + docker run --rm -v %cd%/path-to-secrets:/data mitre/emasser:latest + ``` +**Notes:** +- Docker Options + - `--rm` Automatically remove the container when it exits + - `-v` Bind mount a volume +- path-to-secrets + - Path to the `.env` file and the appropriate eMASS certificates (key. pem and client.pem). See [Editing Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration) + +### Run emasser API client commands - To list all GET, POST, PUT, or DELETE commands use: ``` docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest get help diff --git a/lib/emasser/cli.rb b/lib/emasser/cli.rb index fcf03e9..f015473 100644 --- a/lib/emasser/cli.rb +++ b/lib/emasser/cli.rb @@ -21,7 +21,7 @@ class CLI < Thor exit elsif ARGV[0].to_s.include? 'hello' user_name = ENV['USERNAME'] || 'rookie' - print "Hello #{user_name} - enjoy using emasser!".cyan + puts "Hello #{user_name} - enjoy using emasser!".cyan exit end