Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- build_image () {
- pushd /tmp/stf_init
- if [[ -f Dockerfile ]]; then
- rm -fr Dockerfile
- fi
- docker pull docker.net.billing.ru/etp-cel/stf:0.0.1-SNAPSHOT
- touch Dockerfile
- echo "ARG TESTEE=$1">>Dockerfile
- echo "FROM docker.net.billing.ru/etp-cel/stf:0.0.1-SNAPSHOT">>Dockerfile
- docker build -t docker.net.billing.ru/etp-cell/$1:1.0.0 .
- popd
- }
- build_run_script() {
- pushd /tmp/stf_init
- echo Building stf script...
- touch stf
- echo "#!/bin/bash">>stf
- echo "docker run --rm -it docker.net.billing.ru/etp-cell/${1}:1.0.0">>stf
- chmod +x stf
- mv ./stf /usr/bin/stf
- popd
- }
- set -e
- test -z "$1" && (echo 'Please enter your domain name'; exit 1)
- testee_name=$1
- mkdir -p /tmp/stf_init/
- build_image ${testee_name}
- build_run_script ${testee_name}
- rm -fr /tmp/stf_init
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement