mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 02:18:51 +00:00
Merge pull request #1628 from pi-hole/default_tag
Set default tag for locally build images to pihole:local
This commit is contained in:
@@ -216,14 +216,14 @@ The preferred method is to clone this repository and build the image locally wit
|
|||||||
- `-f <branch>` / `--ftlbranch <branch>`: Specify FTL branch (cannot be used in conjunction with `-l`)
|
- `-f <branch>` / `--ftlbranch <branch>`: Specify FTL branch (cannot be used in conjunction with `-l`)
|
||||||
- `-c <branch>` / `--corebranch <branch>`: Specify Core branch
|
- `-c <branch>` / `--corebranch <branch>`: Specify Core branch
|
||||||
- `-w <branch>` / `--webbranch <branch>`: Specify Web branch
|
- `-w <branch>` / `--webbranch <branch>`: Specify Web branch
|
||||||
- `-t <tag>` / `--tag <tag>`: Specify Docker image tag (default: `pihole`)
|
- `-t <tag>` / `--tag <tag>`: Specify Docker image tag (default: `pihole:local`)
|
||||||
- `-l` / `--local`: Use locally built FTL binary (requires `src/pihole-FTL` file)
|
- `-l` / `--local`: Use locally built FTL binary (requires `src/pihole-FTL` file)
|
||||||
- `use_cache`: Enable caching (by default `--no-cache` is used)
|
- `use_cache`: Enable caching (by default `--no-cache` is used)
|
||||||
|
|
||||||
If no options are specified, the following command will be executed:
|
If no options are specified, the following command will be executed:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker buildx build src/. --tag pihole --no-cache
|
docker buildx build src/. --tag pihole:local --no-cache
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pi-hole features
|
### Pi-hole features
|
||||||
|
|||||||
8
build.sh
8
build.sh
@@ -8,17 +8,17 @@ usage() {
|
|||||||
echo " -c, --corebranch <branch> Specify Core branch"
|
echo " -c, --corebranch <branch> Specify Core branch"
|
||||||
echo " -w, --webbranch <branch> Specify Web branch"
|
echo " -w, --webbranch <branch> Specify Web branch"
|
||||||
echo " -p, --paddbranch <branch> Specify PADD branch"
|
echo " -p, --paddbranch <branch> Specify PADD branch"
|
||||||
echo " -t, --tag <tag> Specify Docker image tag (default: pihole)"
|
echo " -t, --tag <tag> Specify Docker image tag (default: pihole:local)"
|
||||||
echo " -l, --local Use locally built FTL binary (requires src/pihole-FTL file)"
|
echo " -l, --local Use locally built FTL binary (requires src/pihole-FTL file)"
|
||||||
echo " use_cache Enable caching (by default --no-cache is used)"
|
echo " use_cache Enable caching (by default --no-cache is used)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "If no options are specified, the following command will be executed:"
|
echo "If no options are specified, the following command will be executed:"
|
||||||
echo " docker buildx build src/. --tag pihole --load --no-cache"
|
echo " docker buildx build src/. --tag pihole:local --load --no-cache"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set default values
|
# Set default values
|
||||||
DOCKER_BUILD_CMD="docker buildx build src/. --tag pihole --load --no-cache"
|
DOCKER_BUILD_CMD="docker buildx build src/. --tag pihole:local --load --no-cache"
|
||||||
FTL_FLAG=false
|
FTL_FLAG=false
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
@@ -70,7 +70,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
;;
|
;;
|
||||||
-t | --tag)
|
-t | --tag)
|
||||||
TAG="$2"
|
TAG="$2"
|
||||||
DOCKER_BUILD_CMD=${DOCKER_BUILD_CMD/pihole/$TAG}
|
DOCKER_BUILD_CMD=${DOCKER_BUILD_CMD/pihole:local/$TAG}
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user