create my first custom image
Now that I have a running coder in my Kube and tested it with base template, I need to customize it to fit my usage.
I was previously using Gitpod for this and I already have a docker image and it is pushed in my registry.
but I always end with workspaces:
I also started from scratch with a "custom" image only containing:
What do I miss in the process?
Is there a dedicated guide or article on how to write a custom docker image for Coder?
16 Replies
<#1252203647350210671>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
What does your template look like @Thierry Chantier?
We are using manjaro based images. There is nothing special to consider. Could you dump the logs from container?
You mean logs from the corresponding Kubernetes pod or there is a mechanics I’m not aware directly from Coder?
Yeah, he means the workspace container. If I remember correctly, in order for the pods to work outside the coder workspace, I had to also give the coder service account cluster wide admin permissions. Not sure that is your problem, but maybe? Or, try using the coder workspace as the workspace for the pod's creation to see if it runs correctly in that workspace. Just guesses on my part though.
mmm, when I start a workspace, the corresponding pod stays in status docker = {
source = "kreuzwerker/docker"
version = "3.0.2"
}provider "docker" {
registry_auth {
address = "bdmxla3s.gra7.container-registry.ovh.net"
username = "XXXXX"
password = "YYYYY"
}
}```
I used the simple name/password for now, it will be replaced by some Kube magic after first step
hey @Thierry Chantier, the reason this is not working is because the terraform Docker provider and Kubernetes provider don't work with eachother
The Docker provider is used for connecting to a Docker socket whereas the Kubernetes one connects to the Kubernetes API
In the template, if I need to use an image from a private docker registry, what do I need to call? (could not find an article or a documentation on this precise point but I may have missed it)
it seems you want to use
image_pull_secrets
in the Deployment/Podyou might need to define a secret resource first
In any case, do I need to define a docker provider to pull the image? That was my understanding
no, that is only needed if you're actually using Docker directly
in your case everything shall be done via the k8s provider
due to a series of conferences, I won't have enough time to explore more here.
I close this one and will open a new one if useful later.
Thanks a lot.
@Thierry Chantier closed the thread.