Created
July 18, 2019 08:33
-
-
Save muvaf/96da573dfab9cdfbd6d4b02dba5895c4 to your computer and use it in GitHub Desktop.
Copy images from your local host to minikube cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an excerpt from https://github.com/crossplaneio/crossplane/blob/master/cluster/local/minikube.sh | |
# I think it's pretty useful on its own. | |
#!/usr/bin/env bash | |
set -eE | |
function copy_image_to_cluster() { | |
local build_image=$1 | |
local final_image=$2 | |
docker save "${build_image}" | (eval "$(minikube docker-env --shell bash)" && docker load && docker tag "${build_image}" "${final_image}") | |
echo "Copied image ${build_image} to minikube VM as ${final_image}" | |
} | |
copy_image_to_cluster alpine:latest alpine:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment