Skip to content
Snippets Groups Projects
Commit 44c342ed authored by Luke Schoen's avatar Luke Schoen Committed by GitHub
Browse files

[docker] Use `BASH_SOURCE` to find project root, add `.dockerignore` (#13472)

parent 1c92bd5c
Branches
No related merge requests found
......@@ -3,9 +3,8 @@ set -e
pushd .
# The following line ensure we run from the project root
PROJECT_ROOT=`git rev-parse --show-toplevel`
cd $PROJECT_ROOT
# Change to the project root and supports calls from symlinks
cd $(dirname "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")
# Find the current version from Cargo.toml
VERSION=`grep "^version" ./bin/node/cli/Cargo.toml | egrep -o "([0-9\.]+)"`
......@@ -14,7 +13,7 @@ GITREPO=substrate
# Build the image
echo "Building ${GITUSER}/${GITREPO}:latest docker image, hang on!"
time docker build -f ./docker/substrate_builder.Dockerfile -t ${GITUSER}/${GITREPO}:latest .
time DOCKER_BUILDKIT=1 docker build -f ./docker/substrate_builder.Dockerfile -t ${GITUSER}/${GITREPO}:latest .
docker tag ${GITUSER}/${GITREPO}:latest ${GITUSER}/${GITREPO}:v${VERSION}
# Show the list of available images for this repo
......
doc
**target*
.idea/
.git/
.github/
Dockerfile
.dockerignore
.local
.env*
HEADER-GPL3
LICENSE-GPL3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment