-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
57 lines (41 loc) · 1.25 KB
/
Copy pathbuild.sh
File metadata and controls
57 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
set -e
REGISTRY_HOST="ghcr.io"
REGISTRY_USER="cssnr"
REGISTRY_REPO="geopy-mcp"
DEFAULT_VERSION="latest"
BUILD_CONTEXT="."
# shellcheck disable=SC1091
if [ -f ".env" ];then
echo "Sourcing Environment: .env"
set -a
source ".env"
set +a
fi
#if [ -z "${VERSION}" ];then
# if [ -n "${1}" ];then
# VERSION="${1}"
# else
# read -rp "Version (${DEFAULT_VERSION}): " VERSION
# fi
#fi
[[ -z "${VERSION}" ]] && VERSION="${DEFAULT_VERSION}"
#if [ -z "${USERNAME}" ];then
# read -rp "Username: " USERNAME
#fi
#if [ -z "${PASSWORD}" ];then
# read -rp "Password: " PASSWORD
#fi
#
#docker login --username "${USERNAME}" --password "${PASSWORD}" "${REGISTRY_HOST}"
#docker login "${REGISTRY_HOST}"
#docker buildx create --use
#docker buildx build -t "${REGISTRY_HOST}/${REGISTRY_USER}/${REGISTRY_REPO}:${VERSION}" \
# --platform linux/amd64,linux/arm64 \
# "${BUILD_CONTEXT}"
docker build -t "${REGISTRY_HOST}/${REGISTRY_USER}/${REGISTRY_REPO}:${VERSION}" \
"${BUILD_CONTEXT}"
# --build-arg VERSION="${VERSION}" \
#docker push "${REGISTRY_HOST}/${REGISTRY_USER}/${REGISTRY_REPO}:${VERSION}"
echo "Built: ${REGISTRY_HOST}/${REGISTRY_USER}/${REGISTRY_REPO}:${VERSION}"
echo "To test run: docker compose up"