mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-08 21:58:07 -05:00
24 lines
800 B
Bash
Executable File
24 lines
800 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
IMAGE_NAME="atomic-bootnode"
|
|
|
|
# VERSION can be "latest", a release tag, a hash or a branch name that does not
|
|
# contain slashes. The version must be pushed to github, local changes are not
|
|
# seen. The variable both defines which version of the tools is go install'ed
|
|
# inside the container, as well as the docker image tag. We dynamically grab the
|
|
# latest tag from the current branch, as passing a specific version plays nicer
|
|
# with docker's image caching.
|
|
VERSION="$(git describe --abbrev=0 --tags)"
|
|
|
|
# Run docker build from the directory of this script
|
|
cd "$(dirname "$0")"
|
|
|
|
docker build \
|
|
--build-arg "VERSION=${VERSION}" \
|
|
--build-arg "USER_UID=$(id -u)" \
|
|
--build-arg "USER_GID=$(id -g)" \
|
|
. -t "${IMAGE_NAME}:${VERSION}"
|
|
|
|
echo "built ${IMAGE_NAME}:${VERSION}"
|