Skip to content

Commit

Permalink
chore: Use buildkit mode for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
axonasif committed Jan 5, 2023
1 parent 7e55f19 commit 43ad81e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
7 changes: 6 additions & 1 deletion Bashbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ bashbox::build::before() {
}

function livetest {

function docker() {
DOCKER_BUILDKIT=1 command docker "$@";
}

case "${1:-}" in
"minimg")
CONTAINER_IMAGE="axonasif/dotfiles-testing-min:latest";
Expand Down Expand Up @@ -76,7 +81,7 @@ function livetest {
} fi

declare local_container_image_name="workspace-image";
docker built -t "$local_container_image_name" -f "$custom_dockerfile" "$GITPOD_REPO_ROOT";
docker build -t "$local_container_image_name" -f "$custom_dockerfile" "$GITPOD_REPO_ROOT";

CONTAINER_IMAGE="$local_container_image_name";

Expand Down
14 changes: 9 additions & 5 deletions dotsh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ main@bashbox%dotsh ()
};
function livetest ()
{
function docker ()
{
DOCKER_BUILDKIT=1 command docker "$@"
};
case "${1:-}" in
"minimg")
___self_CONTAINER_IMAGE="axonasif/dotfiles-testing-min:latest"
CONTAINER_IMAGE="axonasif/dotfiles-testing-min:latest"
;;
"ws")
function trim_leading_trailing ()
Expand Down Expand Up @@ -132,12 +136,12 @@ main@bashbox%dotsh ()
};
fi;
declare local_container_image_name="workspace-image";
docker built -t "$local_container_image_name" -f "$custom_dockerfile" "$GITPOD_REPO_ROOT";
___self_CONTAINER_IMAGE="$local_container_image_name"
docker build -t "$local_container_image_name" -f "$custom_dockerfile" "$GITPOD_REPO_ROOT";
CONTAINER_IMAGE="$local_container_image_name"
};
else
{
___self_CONTAINER_IMAGE="$(trim_leading_trailing "$res")"
CONTAINER_IMAGE="$(trim_leading_trailing "$res")"
};
fi
};
Expand Down Expand Up @@ -252,7 +256,7 @@ main@bashbox%dotsh ()
fi ) & disown;
if test "${DOTFILES_TMUX:-true}" == true; then
{
___self_AWAIT_SHIM_PRINT_INDICATOR=true exec tmux attach
AWAIT_SHIM_PRINT_INDICATOR=true exec tmux attach
};
else
{
Expand Down

0 comments on commit 43ad81e

Please sign in to comment.