Skip to content

Commit 6fbd5de

Browse files
committed
Update README, small fix for trivy html template
Signed-off-by: Guido Wischrop <Guido.Wischrop@mgm-tp.com> Signed-off-by: mgmgwi <43027257+mgmgwi@users.noreply.github.com>
1 parent a5ada9d commit 6fbd5de

4 files changed

Lines changed: 75 additions & 15 deletions

File tree

Makefile

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,41 @@
1-
all: bullseye buster ubuntu16 ubuntu18 ubuntu20
1+
# Copyright 2020-2021 by all parties listed in the NOTICE file
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
# The default make goal is ubuntu18
17+
.DEFAULT_GOAL := ubuntu18
18+
19+
all: bullseye buster ubuntu16 ubuntu18 ubuntu20 controller
220

321
bullseye:
4-
docker build -f "build/Dockerfile.bullseye" -t indy-node-container/indy_node:bullseye build
22+
docker build -f "build/Dockerfile.bullseye" -t indy-node-container/indy_node:bullseye ./build
523

624
buster:
7-
docker build -f "build/Dockerfile.buster" -t indy-node-container/indy_node:buster build
25+
docker build -f "build/Dockerfile.buster" -t indy-node-container/indy_node:buster ./build
826

927
ubuntu16:
10-
docker build -f "build/Dockerfile.ubuntu16" -t indy-node-container/indy_node:ubuntu16 build
28+
docker build -f "build/Dockerfile.ubuntu16" -t indy-node-container/indy_node:ubuntu16 ./build
1129

1230
ubuntu18:
13-
docker build -f "build/Dockerfile.ubuntu18" -t indy-node-container/indy_node:ubuntu18 build
31+
docker build -f "build/Dockerfile.ubuntu18" -t indy-node-container/indy_node:ubuntu18 ./build
1432

1533
ubuntu20:
16-
docker build -f "build/Dockerfile.ubuntu20" -t indy-node-container/indy_node:ubuntu20 build
34+
docker build -f "build/Dockerfile.ubuntu20" -t indy-node-container/indy_node:ubuntu20 ./build
35+
36+
.PHONY: controller
37+
controller:
38+
docker build controller -t indy-node-container/indy_node_controller
1739

1840
clean_bullseye:
1941
-docker image rm indy-node-container/indy_node:bullseye
@@ -30,7 +52,10 @@ clean_ubuntu18:
3052
clean_ubuntu20:
3153
-docker image rm indy-node-container/indy_node:ubuntu20
3254

33-
clean: clean_bullseye clean_buster clean_ubuntu16 clean_ubuntu18 clean_ubuntu20
55+
clean_controller:
56+
-docker image rm indy-node-container/indy_node_controller
57+
58+
clean: clean_bullseye clean_buster clean_ubuntu16 clean_ubuntu18 clean_ubuntu20 clean_controller
3459

3560

3661
# all check targets require a local trivy installation - see https://aquasecurity.github.io/trivy/
@@ -64,3 +89,9 @@ check_ubuntu20:
6489
-trivy image --ignore-unfixed --severity HIGH,CRITICAL --format template --template "@trivy/html.tpl" -o trivy-reports/ubuntu20.html indy-node-container/indy_node:ubuntu20
6590
# -xdg-open trivy-reports/ubuntu20.html
6691
-trivy image --ignore-unfixed --severity HIGH,CRITICAL indy-node-container/indy_node:ubuntu20
92+
93+
check_controller:
94+
mkdir -p trivy-reports
95+
-trivy image --ignore-unfixed --severity HIGH,CRITICAL --format template --template "@trivy/html.tpl" -o trivy-reports/node_controller.html indy-node-container/indy_node_controller
96+
# -xdg-open trivy-reports/node_controller.html
97+
-trivy image --ignore-unfixed --severity HIGH,CRITICAL indy-node-container/indy_node_controller

NOTICE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@
3333
- Robin Klemens <klemens@internet-sicherheit.de>
3434
- Cristian Kubis <kubis@internet-sicherheit.de>
3535

36+
mgm technology partners GmbH
37+
- Guido Wischrop <guido.wischrop@mgm-tp.com>

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,47 @@
1-
[![Building All Containers](https://github.com/hyperledger/indy-node-container/actions/workflows/build-all.yml/badge.svg)](https://github.com/hyperledger/indy-node-container/actions/workflows/build-all.yml)
2-
3-
41
# Indy Node Container
52

3+
[![Building All Containers](https://github.com/hyperledger/indy-node-container/actions/workflows/build-all.yml/badge.svg)](https://github.com/hyperledger/indy-node-container/actions/workflows/build-all.yml)
4+
65
This repository aims to provide easy-to-use containers with minimal dependencies to run instances of [Hyperledger Indy Node](https://github.com/hyperledger/indy-node). The primary goal is to support stewards joining an existing Network, but of course the containers can also be used in a stand alone (local/test/...) network. The initial contributions stem from the Container Working Group of [ID Union](https://github.com/IDunion). The repository was contributed to Hyperledger in 2022-02.
76

87
Primary artifact are the container images for
8+
99
- [Indy Node](https://github.com/hyperledger/indy-node-container/pkgs/container/indy-node-container%2Findy_node)
1010
- and the [Indy Node Controller](https://github.com/hyperledger/indy-node-container/pkgs/container/indy-node-container%2Findy_node_controller)
1111
which are build from the files in [the build folder](build/).
1212

1313
We also provide a few [utility scripts, including a docker-compose file](run/) to help setting up a run time environment for the containers.
1414
See [here](run/) for instructions how to setup and run the indy node images from this repository.
1515

16+
## Building
17+
18+
To build the node image you can use `docker` from the project root like
19+
20+
```bash
21+
docker build -f "build/Dockerfile.ubuntu18" -t indy-node-container/indy_node:ubuntu18 ./build
22+
```
23+
24+
or you can use `make` which provides some shortcuts
25+
26+
```bash
27+
# make [bullseye|buster|ubuntu16|ubuntu18|ubuntu20|all|controller] (default is ubuntu18), e.g.
28+
make ubuntu18
29+
30+
# make clean removes images
31+
# make [clean|clean_bullseye|clean_buster|clean_ubuntu16|clean_ubuntu18|clean_ubuntu20|clean_controller], e.g. this removes all images
32+
make clean
33+
```
34+
35+
Please note that `make` generates different tags than the Github action (see [packages](https://github.com/hyperledger/indy-node-container/pkgs/container/indy-node-container%2Findy_node) vs. [Makefile](./Makefile)).
36+
37+
If you have [trivy](https://aquasecurity.github.io/trivy) installed, you can use the make check_* targets to run a trivy check against the local images:
38+
39+
```bash
40+
#make [check_bullseye|check_buster|check_ubuntu16|check_ubuntu18|check_ubuntu20|check_controller], e.g.
41+
make check_ubuntu18
42+
```
43+
44+
Trivy HTML reports are created in `./trivy-reports`.
1645

1746
## Contributing
1847

@@ -26,7 +55,6 @@ Be excellent to each other!
2655

2756
[See CODE_OF_CONDUCT.md for details.](CODE_OF_CONDUCT.md)
2857

29-
3058
## License
3159

3260
Copyright 2020-2022 by all parties listed in the [NOTICE](NOTICE) file
@@ -35,11 +63,10 @@ Licensed under the Apache License, Version 2.0 (the "License");
3563
you may not use this file except in compliance with the License.
3664
You may obtain a copy of the License at
3765

38-
http://www.apache.org/licenses/LICENSE-2.0
66+
<http://www.apache.org/licenses/LICENSE-2.0>
3967

4068
Unless required by applicable law or agreed to in writing, software
4169
distributed under the License is distributed on an "AS IS" BASIS,
4270
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4371
See the License for the specific language governing permissions and
4472
limitations under the License.
45-

trivy/html.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
a.toggle-more-links { cursor: pointer; }
5454
</style>
55-
<title>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ getCurrentTime }}</title>
55+
<title>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</title>
5656
<script>
5757
window.onload = function() {
5858
document.querySelectorAll('td.links').forEach(function(linkCell) {
@@ -82,7 +82,7 @@
8282
</script>
8383
</head>
8484
<body>
85-
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ getCurrentTime }}</h1>
85+
<h1>{{- escapeXML ( index . 0 ).Target }} - Trivy Report - {{ now }}</h1>
8686
<table>
8787
{{- range . }}
8888
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>

0 commit comments

Comments
 (0)