Setting up CA certificate for the container
I'm hosting Coder on a Redhat VM that is already configured with it's certificate from our CA. However, I'm having a hard time trying to set it up on the container.
After starting the workspace if I check the
docker logs of the container I getI'm using the Docker Containers starter template and added the upload block on the docker_container resource to upload the certificate from the Coder machine to the container.
This part is working fine, however it does not update the certificates automatically, leading to the error above. To fix this, on the Coder host I have to
docker exec -it <container_id> bash and then run the sudo update-ca-certificates (without sudo fails).I tryed adding this
entrypoint = ["sh", "-c", replace(...), "&&", "sudo update-ca-certificates"] to the entrypoint parameter of the docker_containers resource but it did not work.Is it possible to configure like this? Thanks in advance!
However, using a self-signed certificate to validate it still caused the "could not resolve hostname" error when trying to open Coder on VS Code Desktop extension.
It was necessary, in addition to including the self-signed certificate in the trust store of our machine, which had already been done, to add the environment variable NODE_EXTRA_CA_CERTS on the machine pointing to the path of the certificate.
