If you’re encountering an error related to authentication, it could also be linked to the format of your configuration. Could you provide the specific error message you are encountering? This might help in determining whether the issue is due to the authentication credentials or the format of your YAML file.
Ok, thanks. I’m actually trying to build a container with all the plugins pre-installed. Not sure yet how Docker in Docker will work out… lol. Anyway, I’ll figure it out, thanks.
I figured out how to build a Docker image with an attached network path to the host Docker socket, but when I built my container, I noticed that my plugin was not in the .cq/plugins/source folder.
My Dockerfile is basically like this:
ARG TAG=latest
FROM ghcr.io/cloudquery/cloudquery:${TAG}
ARG DOCKER_HOST=tcp://socat:12345
ARG API_KEY
RUN apk add --no-cache aws-cli docker jq
WORKDIR /app
COPY base_config.yml base_config.yml
RUN docker ps
RUN CLOUDQUERY_API_KEY=${API_KEY} PG_CONNECTION_STRING=foobar ./cloudquery plugin install .
ENTRYPOINT [ "" ]
The base_config.yml has the custom module as I’ve described above. I would have expected that the cloudquery plugin install should add the source plugin, but it’s not there.
So Docker plugins rely on Docker running locally. When we run cloudquery plugin install, it is actually a wrapper around docker pull, so the images do not end up in .cq/plugins/source. The easiest way to deploy a Docker plugin in a containerized environment is to run the plugin as a sidecar and communicate via gRPC. We have an example of how to do this in our docs: Using Cloud Query Docker Registry Plugins Inside a Containerized Environment
Afk now. Thanks for the info! If they don’t end up in the source folder, then is there a way to see if it worked? Besides, of course, testing it, I wanted to create a way to validate on build before any execution.
The best way to validate that it was successful is probably to run the cloudquery tables command as that interacts with the plugin but doesn’t execute it. CloudQuery Tables Documentation