mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-09 20:21:01 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user