jpetazzo / container.training

Slides and code samples for training, tutorials, and workshops about Docker, containers, and Kubernetes.

Home Page:http://container.training/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for github codespace

remyleone opened this issue · comments

Adding devcontainers could be really useful to have quickly a complete setup with an editor, kubectl and a docker command line installed:

Hi!

First of all, happy new year 🎉

I don't have access to codespace (looks like it's only for Team and Enterprise users) and I can't find docs showing how to do more than just a container image; but when it becomes more widely available, we can give it a try, yes.

I've tried gitpod in the past, and it's promising, but all these platforms suffer from a common issue: when learning Docker and Kubernetes, it's important to be able to connect to the machine (e.g. after publishing a container's port, or creating a NodePort or LoadBalancer service) and that requires some specific integration in the platform; like Play-With-Docker has, for instance.

Another approach, if you have a Kubernetes cluster (any Kubernetes cluster) is to use the image jpetazzo/shpod (or ghcr.io/jpetazzo/shpod). It provides a "ready to go" environment that you can use either by kubectl execing into it, or by SSH'ing.

I hope that helps!

I think you can do port manipulation with codespace: https://docs.github.com/en/codespaces/getting-started/quickstart I'm not sure to understand what you mean by platform-specific.
Right now I can use kubectl natively with codespace (and I don't have team or enterprise) and this repo. I have also access to a docker runtime out of the box. You can configure the image used in the codespace to include arbitrary tools.

Just tested it and I was able to interact with a kapsule cluster in seconds without any special configuration. (I'm planning up a workshop soon that's why I thought of this solution to avoid the heterogeneity of the students configurations).

I don't think codespaces is generally available, is it?
image

If that can help --- I have Terraform configs that can spawn arbitrary number of Kapsule clusters, running an SSH server in a pod, with all the tools preinstalled. Ping me on Discord if you're interested, I can show you quickly what that looks like (that's what I use for training sessions)

I've been using it for a year I think at https://github.com/codespaces. I love it.

image

"None of your organizations have access to Codespaces yet"