In order to do that, you’d need to:
- Download our base image to your local docker
- Create a Dockerfile off of that image
- Build your custom image and push it to your repository
- Edit the docker image in the agent values
Downloading the base image
- Find the base image tag you’re using. Find the helm value of
dockerImage
in your installation. It should be in the following format:ghcr.io/env0/deployment-agent:<image_tag>
- Create a docker config file that has permission to pull the base image: Take the helm value of
agentImagePullSecret
, decode it from base64 and you’ll get a JSON. Save that JSON locally in the current folder, in a file namedconfig.json
- Pull the image using this config
Create a Dockerfile
Create a Dockerfile based on the image that was downloaded. There are some limitations to the Dockerfile. Read the comments on the template for more information:Dockerfile
Build the custom image and push it to your own repository
Build your image and push it to your own image repositoryUse the custom image in the env zero agent
Now you simply have to overwrite the helm values ofagentImagePullSecret
and dockerImage
to match your own custom image
dockerImage
should be<remote-repository>:<image-tag>
agentImagePullSecret
should be a base64 encoding of the docker config used to pull the image- Perform a
helm upgrade
with those new values