add push and test instructions for hepc container
This commit is contained in:
committed by
=Michael Hohn
parent
8c606bd229
commit
a5d7e10d62
@@ -1,29 +1,54 @@
|
||||
* Container Build
|
||||
* Container Image Build
|
||||
Follow the [[file:~/work-gh/mrva/mrvahepc/README.org::*Usage Sample][Usage Sample]] in mrvahepc to set up the repository and data there. Then:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
cd ~/work-gh/mrva/mrva-docker/containers/hepc # this directory
|
||||
rm -fR ./mrvahepc && cp -r ../../../mrvahepc .
|
||||
** Build container
|
||||
#+BEGIN_SRC sh
|
||||
cd ~/work-gh/mrva/mrva-docker/containers/hepc # this directory
|
||||
rm -fR ./mrvahepc && cp -r ../../../mrvahepc .
|
||||
|
||||
# Usual build
|
||||
docker build -t mrva-hepc-container:0.1.24 -f Dockerfile .
|
||||
# Usual build
|
||||
docker build -t mrva-hepc-container:0.1.24 -f Dockerfile .
|
||||
|
||||
# Build with full output, e.g. RUN ls
|
||||
docker build --progress=plain --no-cache -t mrva-hepc-container:0.1.24 -f Dockerfile .
|
||||
# Build with full output, e.g. RUN ls
|
||||
docker build --progress=plain --no-cache -t mrva-hepc-container:0.1.24 -f Dockerfile .
|
||||
|
||||
# Run standalone
|
||||
docker run -p 8070:8070 -ti mrva-hepc-container:0.1.24
|
||||
# Run standalone
|
||||
docker run -p 8070:8070 -ti mrva-hepc-container:0.1.24
|
||||
|
||||
# Test server
|
||||
curl 127.0.0.1:8070/index -o - 2>/dev/null | wc -l
|
||||
# Test server
|
||||
curl 127.0.0.1:8070/index -o - 2>/dev/null | wc -l
|
||||
|
||||
curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
|
||||
-o - 2>/dev/null | wc -l
|
||||
curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
|
||||
-o - 2>/dev/null | wc -l
|
||||
|
||||
url=$(curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
|
||||
-o - 2>/dev/null | head -1 | jq -r .result_url)
|
||||
echo $url
|
||||
# http://hepc/db/db-collection.tmp/aircrack-ng-aircrack-ng-ctsj-41ebbe.zip
|
||||
url=$(curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
|
||||
-o - 2>/dev/null | head -1 | jq -r .result_url)
|
||||
echo $url
|
||||
# http://hepc/db/db-collection.tmp/aircrack-ng-aircrack-ng-ctsj-41ebbe.zip
|
||||
|
||||
wget $(echo $url|sed 's|http://hepc|http://127.0.0.1:8070|g;')
|
||||
#+END_SRC
|
||||
wget $(echo $url|sed 's|http://hepc|http://127.0.0.1:8070|g;')
|
||||
#+END_SRC
|
||||
|
||||
** Push this container
|
||||
#+BEGIN_SRC sh
|
||||
# Push container
|
||||
docker tag mrva-hepc-container:0.1.24 ghcr.io/hohn/mrva-hepc-container:0.1.24
|
||||
docker push ghcr.io/hohn/mrva-hepc-container:0.1.24
|
||||
# 0.1.24: digest: sha256:b089c6495b04ed6b4a4f467cd16d671b2404834c53ba020d3afd195a4ec870fb size: 2831
|
||||
#+END_SRC
|
||||
|
||||
** Test the registry image
|
||||
#+BEGIN_SRC sh
|
||||
# Test pushed container
|
||||
docker pull ghcr.io/hohn/mrva-hepc-container:0.1.24
|
||||
|
||||
docker run \
|
||||
-p 8070:8070 \
|
||||
--name test-mrva-hepc-container \
|
||||
--rm -it ghcr.io/hohn/mrva-hepc-container:0.1.24
|
||||
|
||||
|
||||
curl 127.0.0.1:8070/index -o - 2>/dev/null | wc -l
|
||||
#+END_SRC
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user