Skip to content

Commit

Permalink
Merge pull request #62 from udosson/ubuntu-2004
Browse files Browse the repository at this point in the history
added ubuntu 20.04 test image for indy node
  • Loading branch information
Echsecutor committed Nov 23, 2021
2 parents 1cea123 + f8766c3 commit 3edab71
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
repo_owner: ${{ steps.repo_owner.outputs.lowercase }}
os_matrix: "{\"os_version\":[\"bullseye\",\"buster\",\"ubuntu16\",\"ubuntu18\"]}"
os_matrix: "{\"os_version\":[\"bullseye\",\"buster\",\"ubuntu16\",\"ubuntu18\",\"ubuntu20\"]}"
steps:
- name: Lowercase repo owner
id: repo_owner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: "ubuntu-20.04"
strategy:
matrix:
os_version: [ bullseye, buster, ubuntu16, ubuntu18]
os_version: [ bullseye, buster, ubuntu16, ubuntu18, ubuntu20 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ keys
.node.env
.history
trivy-reports
test/etc_indy/node*
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: bullseye buster ubuntu16 ubuntu18
all: bullseye buster ubuntu16 ubuntu18 ubuntu20

bullseye:
docker build -f "build/Dockerfile.bullseye" -t indy-node-container/indy_node:bullseye build
Expand All @@ -12,6 +12,9 @@ ubuntu16:
ubuntu18:
docker build -f "build/Dockerfile.ubuntu18" -t indy-node-container/indy_node:ubuntu18 build

ubuntu20:
docker build -f "build/Dockerfile.ubuntu20" -t indy-node-container/indy_node:ubuntu20 build

clean_bullseye:
-docker image rm indy-node-container/indy_node:bullseye

Expand All @@ -24,7 +27,10 @@ clean_ubuntu16:
clean_ubuntu18:
-docker image rm indy-node-container/indy_node:ubuntu18

clean: clean_bullseye clean_buster clean_ubuntu16 clean_ubuntu18
clean_ubuntu20:
-docker image rm indy-node-container/indy_node:ubuntu20

clean: clean_bullseye clean_buster clean_ubuntu16 clean_ubuntu18 clean_ubuntu20


# all check targets require a local trivy installation - see https://aquasecurity.github.io/trivy/
Expand Down Expand Up @@ -52,3 +58,9 @@ check_ubuntu18:
-trivy image --ignore-unfixed --severity HIGH,CRITICAL --format template --template "@trivy/html.tpl" -o trivy-reports/ubuntu18.html indy-node-container/indy_node:ubuntu18
# -xdg-open trivy-reports/ubuntu18.html
-trivy image --ignore-unfixed --severity HIGH,CRITICAL indy-node-container/indy_node:ubuntu18

check_ubuntu20:
mkdir -p trivy-reports
-trivy image --ignore-unfixed --severity HIGH,CRITICAL --format template --template "@trivy/html.tpl" -o trivy-reports/ubuntu20.html indy-node-container/indy_node:ubuntu20
# -xdg-open trivy-reports/ubuntu20.html
-trivy image --ignore-unfixed --severity HIGH,CRITICAL indy-node-container/indy_node:ubuntu20
54 changes: 54 additions & 0 deletions build/Dockerfile.ubuntu20
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This container is to run indy-node.
# It has been created in the indy-node docker working group of the ID Union project.
# author: Robin Klemens <klemens@intnernet-sicherheit.de>

FROM ubuntu:20.04

RUN apt-get update -y && apt-get install -y \
apt-transport-https \
ca-certificates \
gnupg2 \
## ToDo remove unused packages
libgflags-dev \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
liblz4-dev \
libgflags-dev \
python3-pip

# Bionic-security for libssl1.0.0
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32 \
&& echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list

# Sovrin
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 \
&& bash -c 'echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list'

# Hyperledger Artifactory
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 9692C00E657DDE61 \
&& echo "deb https://hyperledger.jfrog.io/artifactory/indy focal dev" >> /etc/apt/sources.list \
# Prioritize packages from hyperledger.jfrog.io
&& printf '%s\n%s\n%s\n' 'Package: *' 'Pin: origin hyperledger.jfrog.io' 'Pin-Priority: 1001' >> /etc/apt/preferences

RUN apt-get update -y && apt-get install -y \
indy-node="1.13.0~dev206" \
indy-plenum="1.13.0~dev175" \
ursa="0.3.2-1" \
python3-pyzmq="18.1.0" \
rocksdb=5.8.8 \
&& rm -rf /var/lib/apt/lists/* \
# fix path to libursa
&& ln -s /usr/lib/ursa/libursa.so /usr/lib/libursa.so

RUN pip3 install -U \
# Required by setup.py
setuptools==50.3.2 \
'pip<10.0.0'


WORKDIR /home/indy

COPY init_and_run.sh ./

CMD ["./init_and_run.sh"]

0 comments on commit 3edab71

Please sign in to comment.