mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
[docker] Use BASH_SOURCE to find project root, add .dockerignore (#13472)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
doc
|
||||
**target*
|
||||
.idea/
|
||||
.git/
|
||||
.github/
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.local
|
||||
.env*
|
||||
HEADER-GPL3
|
||||
LICENSE-GPL3
|
||||
Reference in New Issue
Block a user