File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # Run Dive as Docker Image
4
+ # https://github.com/wagoodman/dive
5
+
6
+ export DIVE_IMAGE=" ${DIVE_IMAGE:- " wagoodman/dive" } "
7
+ export DIVE_VERSION=" ${DIVE_VERSION:- " latest" } "
8
+
9
+ main () {
10
+ local OPTS=()
11
+ OPTS+=(--rm)
12
+ # OPTS+=(-q)
13
+ [[ -t 0 ]] && OPTS+=(-it) # terminal
14
+ OPTS+=(-v /var/run/docker.sock:/var/run/docker.sock)
15
+ OPTS+=(-v " $( pwd) :$( pwd) " )
16
+ OPTS+=(-w " $( pwd) " )
17
+ # When running dive with the environment variable CI=true then
18
+ # the dive UI will be bypassed and will instead analyze your docker image,
19
+ # giving it a pass/fail indication via return code.
20
+ # https://github.com/wagoodman/dive#ci-integration
21
+ [[ " $( whoami) " == " runner" ]] && OPTS+=(-e " CI=true" )
22
+ # https://github.com/wagoodman/dive#ui-configuration
23
+ [[ -r " $HOME /.dive.yaml" ]] && OPTS+=(-v " $HOME /.dive.yaml" :" $HOME /.dive.yaml" )
24
+ docker run " ${OPTS[@]} " " ${DIVE_IMAGE} :${DIVE_VERSION} " " $@ "
25
+ }
26
+
27
+ main " $@ "
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ brew "readline" # [Library for command-line editing](https://tiswww.case.edu/php
100
100
# brew "awscli" # !!! NO BOTTLE !!! HANGS
101
101
# brew "cloud-nuke" # [CLI tool to delete all cloud resources](https://github.com/gruntwork-io/cloud-nuke)
102
102
# brew "dependency-check" # !!! REQUIRES XCODE [OWASP dependency-check](https://jeremylong.github.io/DependencyCheck/)
103
- brew "dive" # [Inspection of docker image layers](https://github.com/wagoodman/dive)
103
+ # brew "dive" # [Inspection of docker image layers](https://github.com/wagoodman/dive)
104
104
brew "docker"
105
105
# brew "elixir"
106
106
# brew "erlang"
You can’t perform that action at this time.
0 commit comments