This commit is contained in:
jay
2022-10-23 21:32:02 +08:00
parent 99172a5da5
commit 44ee4cca95
7 changed files with 36 additions and 9 deletions
+20
View File
@@ -31,6 +31,23 @@ function envf {
export $(cat $1 | grep -v '^#' | xargs)
}
function save-image {
if [ -z "$1" ]; then
echo "usage: save-image <image-name>"
exit 1
fi
imageName=$(echo ${1##*/} | sed 's/:/_/' | xargs -I {} echo "{}.tar")
lima nerdctl pull $1
lima nerdctl image save -o $imageName $1
lima nerdctl image rm $1
}
function ttySize {
echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)"
}
export HISTORY_SUBSTRING_SEARCH_PREFIXED=1
export GOPATH="$HOME/go"
export GOROOT="$HOME/apps/go"
@@ -55,3 +72,6 @@ if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/ap
# The next line enables shell command completion for gcloud.
# if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi
alias docker="lima nerdctl"
export DOCKER_HOST="unix:///Users/jay/.lima/docker/sock/docker.sock"