Skip to content

Commit abbe1dd

Browse files
committed
Migrate bashup images to ghcr.io
1 parent 055b4eb commit abbe1dd

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Running `dk with-bash VERSION command ...` runs `dk command ...` inside a docke
354354

355355
The following variables control the operation of the container:
356356

357-
* `$BASHKIT_IMAGE` -- Image to run: defaults to [bashitup/bash-kit](https://github.com/bashup/bash-kit); if it is not changed from the default, the bash version can be [any official bash tag](https://hub.docker.com/_/bash?tab=tags), and the needed image will be pulled or built if necessary.
357+
* `$BASHKIT_IMAGE` -- Image to run: defaults to [bashup/bash-kit](https://github.com/bashup/bash-kit); if it is not changed from the default, the bash version can be [any official bash tag](https://hub.docker.com/_/bash?tab=tags), and the needed image will be pulled or built if necessary.
358358
* `$BASHKIT_DOCKER_OPTS` -- An array of additional options to run the container with; defaults to `-it` for an interactive run. (`--rm`, `-e TERM`, volume mappings and the command line are automatically generated, so you do not need to include them here.) If you need multiple options or values, set them as an array, e.g. `BASHKIT_DOCKER_OPTS=(--foo "bar baz")`, or `BASHKIT_DOCKER_OPTS=()` to remove the default options.
359359

360360
Inside the docker container, a `run-bash VERSION command...` command is run first, allowing you to do any docker-specific setup (e.g. installing additional dependencies) by either overriding the command or defining a `before` handler for the `run-bash` event.

modules/bash-kit

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
export BASHKIT_IMAGE=bashitup/bash-kit
3+
export BASHKIT_IMAGE=ghcr.io/bashup/bash-kit
44
export BASHKIT_DOCKER_OPTS=(-it)
55

66

@@ -9,8 +9,8 @@ bashkit-build() {
99
REPLY=$1; [[ $REPLY == *:* ]] || REPLY+=:$2
1010

1111
# Only build if standard image, non-standard tag, and doesn't exist locally
12-
[[ $1 != bashitup/bash-kit ]] && return
13-
[[ " 3.2 4.2 4.3 4.4 5.0 " == *" $2 "* ]] && return
12+
[[ $1 != ghcr.io/bashup/bash-kit ]] && return
13+
[[ " 3.2 4.2 4.3 4.4 5.0 5.1 " == *" $2 "* ]] && return
1414
[[ "$(docker images -q "$1:$2")" ]] && return
1515

1616
# build from github

modules/bash32

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ echo "Warning: bash32 module is deprecated; use bash-kit instead" >&2
33

44
dk use: bash-kit
55

6-
export BASH32_IMAGE=bashitup/bash-3.2
6+
export BASH32_IMAGE=ghcr.io/bashup/bash-kit:3.2
77
export BASH32_DOCKER_OPTS="-it"
88

99
bash32.prepare-image() {
@@ -20,9 +20,9 @@ dk.bash32() {
2020
bash32.prepare-image
2121

2222
# Figure out what image to use, falling back to BASHKIT_IMAGE
23-
# if using the default bashitup/bash-3.2:latest image
24-
REPLY=$BASH32_IMAGE; [[ $REPLY == *:* ]] || REPLY+=":latest"
25-
[[ $REPLY != "bashitup/bash-3.2:latest" ]] || REPLY=$BASHKIT_IMAGE
23+
# if using the default ghcr.io/bashup/bash-kit:3.2 image
24+
REPLY=$BASH32_IMAGE; [[ $REPLY == *:* ]] || REPLY+=":3.2"
25+
[[ $REPLY != "ghcr.io/bashup/bash-kit:3.2" ]] || REPLY=$BASHKIT_IMAGE
2626

2727
# shellcheck disable=SC2034
2828
local BASHKIT_IMAGE=$REPLY BASHKIT_DOCKER_OPTS=("$BASH32_DOCKER_OPTS")

0 commit comments

Comments
 (0)