Skip to content

Commit

Permalink
Merge pull request #33 from mitre/updateVersionTags
Browse files Browse the repository at this point in the history
UpdateVersionTags
  • Loading branch information
georgedias authored Jan 14, 2022
2 parents 6b652e5 + 9d1cfab commit 0dccba8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)

Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</br>


![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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/emasser/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0dccba8

Please sign in to comment.