16 lines
646 B
Bash
Executable File
16 lines
646 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build cerc/optimism-contracts
|
|
|
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
|
|
|
# See: https://stackoverflow.com/a/246128/1701505
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
# The optimism contracts image has dependencies with no aarch64 support, so on aarch64 use an
|
|
# emulated amd64 image
|
|
if [[ $(docker info --format='{{ .Architecture }}') == "aarch64" ]]; then
|
|
PLATFORM_ARG="--platform linux/amd64"
|
|
fi
|
|
|
|
docker build -t cerc/optimism-contracts:local -f ${CERC_REPO_BASE_DIR}/optimism/ops/docker/Dockerfile.packages ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism $PLATFORM_ARG
|