Hardening of the Frontend docker image (#377)

* move the env-config script to a sub folder
* fix doc
* fix ports and ref to the official image
* add hardening to the docker-compose examples
This commit is contained in:
Chevdor
2021-08-26 12:20:01 +02:00
committed by GitHub
parent c201ece634
commit 238d529eae
10 changed files with 83 additions and 22 deletions
+23 -6
View File
@@ -1,11 +1,28 @@
#!/usr/bin/env bash
set -e
cd `git rev-parse --show-toplevel`
pushd "$(git rev-parse --show-toplevel)/frontend" > /dev/null
IMAGE=telemetry-frontend
DOCKER_USER=${DOCKER_USER:-paritytech}
while getopts ":Nsgapv:" arg; do
case "${arg}" in
p)
PUBLISH="true"
;;
esac
done
IMAGE=substrate-telemetry-frontend
DOCKER_USER=${DOCKER_USER:-paritytech}
echo "Publishing $IMAGE as $DOCKER_USER"
docker build -t $IMAGE -f packages/frontend/Dockerfile .
docker tag $IMAGE $DOCKER_USER/$IMAGE
docker push $DOCKER_USER/$IMAGE
docker build -t $DOCKER_USER/$IMAGE -f ./Dockerfile .
if [[ "$PUBLISH" = 'true' ]]; then
docker push $DOCKER_USER/$IMAGE
else
echo 'No -p passed, skipping publishing to docker hub'
fi
popd > /dev/null
docker images | grep $IMAGE