lotus/docker-images/build.sh
Raúl Kripalani f29141b855
simplify the docker build base and runtime images + remove the go.rice trickery (#48)
* adjust the prototype for building oni test plans.

- We no longer clone the entire lotus codebase.
- We only clone and build the ffi module in the build image.
- The runtime image no longer builds the ffi module.
- The runtime image uses go-paramfetch to fetch the parameters
  (which are not expected to change).
- We use filecoin-project/lotus#2097 to not have to deal with
  go.rice trickery for things we don't actually need to use.

* add filecoin-ffi submodule (commit ca281af); fix replace directive.

* remove stale file.

* tag build base images.

* fix build.sh.

* delete filecoin-ffi submodule from root.

* add filecoin-ffi submodule under extra/filecoin-ffi.

* adjust everything to use extra sources TG feature.
2020-06-23 15:20:47 +02:00

28 lines
492 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o pipefail
set -e
set -x
err_report() {
echo "Error on line $1"
}
trap 'err_report $LINENO' ERR
TAG=$1
# Validate required arguments
if [ -z "$TAG" ]
then
echo -e "Please provide a tag for the build. For example: \`./build.sh v3\`"
exit 2
fi
dir="$(dirname "$0")"
docker build -t "iptestground/oni-buildbase:$TAG" -f "$dir/Dockerfile.oni-buildbase" "$dir"
docker build -t "iptestground/oni-runtime:$TAG" -f "$dir/Dockerfile.oni-runtime" "$dir"