nimbus-eth1/docker/dist/base_image/make_base_image.sh
Ștefan Talpalaru 51bc1cf87f
dist: precompiled binaries and Docker images (#1015)
* dist: precompiled binaries and Docker images

The builds are reproducible, the binaries are portable and statically link librocksdb.

This took some patching. Upstream PR: https://github.com/facebook/rocksdb/pull/9752

32-bit ARM is missing as a target because two different GCC versions
fail with an ICE when trying to cross-compile RocksDB. Using Clang
instead is too much trouble for a platform that nobody should be using
anyway.

(Clang doesn't come with its own target headers and libraries, can't be
easily convinced to use the ones from GCC, so it needs an fs image from
a 32-bit ARM distro - at which point I stopped caring).

* CI: disable reproducibility test
2022-03-27 13:21:15 +02:00

31 lines
713 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2020-2021 Status Research & Development GmbH. Licensed under
# either of:
# - Apache License, version 2.0
# - MIT license
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
# Build base Docker images for making distributable binaries.
# Should be used from "build-*" Make targets, passing the target architecture's
# name and Docker image tag as parameters.
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ -z "${2}" ]]; then
echo "Usage: $(basename ${0}) ARCH DOCKER_TAG"
exit 1
fi
ARCH="${1}"
DOCKER_TAG="${2}"
DOCKER_BUILDKIT=1 \
docker build \
-t ${DOCKER_TAG} \
--progress=plain \
-f Dockerfile.${ARCH} .