Open lgrossma opened 3 weeks ago
@lgrossma Excellent, detailed explanation. Thanks!
In step 4, where local code is synced to the container (not volumes), it is not evident to me how this is done. Afaik containers are read-only. Without any "special means" one would run a new container with the updated code. If no new container is spun up one would need some special means to copy the updated local classes to the containers. Rsync?
@vrubezhny, @datho7561: do you know more about it?
Afaik containers are read-only
It seems you can use kubectl cp
to write files to the container.
Afaik containers are read-only
It seems you can use
kubectl cp
to write files to the container.
@datho7561: oh, indeed. nice pointer, thx!
https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/
kubectl cp
requires tar
to be available in the destination pod. It looks as if kubectl cp
is using tar + ssh (?) to copy to the filesystem of the pod: https://github.com/kubernetes/kubectl/blob/a49902335815c339759acdb16444c4115232c518/pkg/cmd/cp/cp.go#L300-L350
The
odo dev
command basically automates this process:npm install
andnpm start
for example)No info from devfile is required