ligo/scripts/create_docker_image.alpine.opam2.sh

35 lines
691 B
Bash
Raw Normal View History

2017-12-07 02:03:27 +04:00
#! /bin/sh
set -e
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")"
cd "$src_dir"
. scripts/version.sh
image_name="${1:-tezos/opam2}"
image_version="${2:-alpine-${alpine_version}_ocaml-${ocaml_version}}"
cleanup () {
set +e
echo Cleaning up...
rm -rf Dockerfile
}
trap cleanup EXIT INT
2018-01-22 13:42:02 +04:00
#opam_tag=2.0.0-beta5
opam_tag=master
2017-12-07 02:03:27 +04:00
sed scripts/Dockerfile.alpine.opam2.in \
-e 's|$alpine_version|'"$alpine_version"'|g' \
-e 's|$ocaml_version|'"$ocaml_version"'|g' \
-e 's|$opam_tag|'"$opam_tag"'|g' > Dockerfile
echo
echo "### Building base image..."
echo
docker build --pull -t "$image_name:$image_version" .
rm Dockerfile