minikube scp

Created on 11 Dec 2020  路  7Comments  路  Source: kubernetes/minikube

It would be nice to be able to have minikube scp like minikube ssh, to copy files in the the minikube node. An use case would be: copying Dockerfiles to the node to build custom docker images for Kubernetes.

In the meantime, for all of you that want this feature, here's a workaround:

scp -i $(minikube ssh-key) <file> docker@$(minikube ip):

edit: you can also use minikube docker-env to set up the docker client to point to minikube's docker daemon, and build the image locally. However, this still doesn't work for copying files...

kinfeature prioritbacklog

All 7 comments

This feature is available in docker-machine, so we should probably make it available in minikube as well.

https://docs.docker.com/machine/reference/scp/

The turbo-charged version also has support for rsync, for delta transfer and other advanced uses.

An use case would be: copying Dockerfiles to the node to build custom docker images for Kubernetes.

Like you mention, this use case should be supported by minikube (or docker) directly... See also #4868

I would like to work on this if there is no objection.

Sure, please do a PR.

The original code is in: https://github.com/docker/machine/blob/master/commands/scp.go

But minikube is different...

It would be OK to call out to the external programs for "scp" and for "rsync", at least initially.

I too would love to see this get implemented.

/assign

Was this page helpful?
0 / 5 - 0 ratings