Docker: use remote opam image by default

This commit is contained in:
Grégoire Henry 2018-02-15 11:40:25 +01:00 committed by Grégoire Henry
parent 322fc1e353
commit 040d99b673
3 changed files with 28 additions and 10 deletions

View File

@ -9,7 +9,6 @@ cd "$src_dir"
. "$script_dir"/version.sh
export build_dir=${build_dir:-_docker_build}
tmp_dir=$(mktemp -dt tezos.opam.tezos.XXXXXXXX)
cleanup () {
@ -25,7 +24,9 @@ base_image_name="${3-${image_name}_deps:${image_version}}"
cat <<EOF > "$src_dir"/Dockerfile
FROM $base_image_name
COPY . tezos
COPY Makefile tezos/
COPY src tezos/src/
COPY vendors tezos/vendors/
RUN sudo chown -R opam tezos && \
opam exec -- make -C tezos all build-test
EOF

View File

@ -9,7 +9,6 @@ cd "$src_dir"
. "$script_dir"/version.sh
export build_dir=${build_dir:-_docker_build}
tmp_dir=$(mktemp -dt tezos.build_deps.tezos.XXXXXXXX)
cleanup () {

View File

@ -8,22 +8,40 @@ cd "$src_dir"
. "$script_dir"/version.sh
export build_dir=$(mktemp -dt tezos.docker.XXXXXXXX)
if [ "$1" = "--build-opam" ] ; then
build_opam=yes
shift 1
fi
image_name="${1:-tezos}"
image_version="${2:-latest}"
build_dir="${3:-$src_dir/_docker_build}"
opam_image_name="${image_name}_opam"
build_image_name="${image_name}_build"
build_deps_image_name="${image_name}_build_deps"
if [ -n "$build_opam" ] ; then
export build_dir
"$script_dir"/ci/create_docker_image.opam.sh \
"$opam_image_name" "$image_version"
else
docker pull registry.gitlab.com/tezos/tezos/opam:latest
docker tag registry.gitlab.com/tezos/tezos/opam:latest \
"$opam_image_name:$image_version"
fi
"$script_dir"/ci/create_docker_image.build_deps.sh \
"$build_deps_image_name" "$image_version" "$opam_image_name:$image_version"
"$build_deps_image_name" "$image_version" \
"$opam_image_name:$image_version"
"$script_dir"/ci/create_docker_image.build.sh \
"$build_image_name" "$image_version" "$build_deps_image_name"
"$build_image_name" "$image_version" \
"$build_deps_image_name"
"$script_dir"/ci/create_docker_image.minimal.sh \
"$image_name" "$image_version" "$build_image_name"