Connect to Multiple Registries for buildandpush Step
pending feedback
L
Lemon glacier Duck
We want to build and push images to our main repository (Artifactory), however we do not want to use Artifactory as a Layer Cache, rather we would like to use AWS ECR as a layer cache.
Log In
L
Lemon glacier Duck
Hi,
Great to see that remote layer caching in S3 has been added.
However, we no longer use Harness, so I can't really test this out.
Thanks
M
Magic Squid
Lemon glacier Duck yeah I had upvoted this too but we moved off harness because it didn't support this
N
Nofar Bluestein
Hey,
We have recently added support for Docker Layer Caching in the build-and-push steps , while storing the cache in S3 bucket. You can use the Default settings framework to globally define (using AWS connector) a bucket for caching, and check the DLC checkbox in the build and push steps to enable DLC. Will that work for you?
Please see the below documentation for more information
Regards,
Nofar Bluestein
CI product manager
Canny AI
Merged in a post:
Feature Request: Using local Docker Cache to build multiple images in same stage.
S
Spatial Catshark
I checked with our engineering team and did some validation as well but it seems none of them cache and our engineering team is working on layer caching for different requirement which will take care of this use case. At this moment here are only options.
• Create an persistant volume or empty directory for /var/lib/docker/ and add them to shared path in overview tab. This ensure that this path will be mounted in all containers/step container.
• Use remote cache option in build and push ecr step (again here we need to use ECR or any docker registry to store layers)
I used 'Shared Path' feature against /var/lib/docker that allows (or should allow) to mount the same directory to multiple containers in a pod
and I created additional 'Build and Push' step right after existing one - the execution time didn't change and the directory /var/lib/docker appeared to be empty
The idea behind this configuration is to push images to multiple registries/repositories which is the project requirement currently. With the custom 'Run' step we can have multiple 'push' executions, so it's not an issue. We are trying to leverage 'managed' Harness steps as much as possible, so if the current configuration does not allow us to use the image layers cache, please consider adding a feature to push images to multiple destinations.
Canny AI
Merged in a post:
Enable docker cache layer
B
Broad Bee
Hello I would like to request enable this feature for our portal:
https://developer.harness.io/docs/continuous-integration/use-ci/caching-ci-data/docker-layer-caching in order to enable the layer caching for our docker images that we are building
B
Broad Bee
Thanks
L
Lemon glacier Duck
Hi,
When we run an image build (from a Dockerfile), Kaniko has an option to use a layer cache.
The current way it works, means that we need to use the same layer cache as where the image is being pushed.
So what we are looking to do is..
Kaniko build -> Use ECR layer cache -> push image + tags to Artifactory
N
Nofar Bluestein
pending feedback
N
Nofar Bluestein
Hey, thank you for you request.
Could you please explain further what you mean by "we do not want to use Artifactory as a Layer Cache" ? Do you mean that you want to pull an image from ECR but push an image to artifactory ?
Thank you ,
Nofar Bluestein,
CI product team
M
Magic Squid
Nofar Bluestein we want to use ECR as the --cache-repo but push to jfrog artifactory
N
Nofar Bluestein
Hey, I've enabled it for you.
Please let us know if you have any further questions.
Thanks.
Pranav Rastogi
Thank you for your feedback. Our recommendation is to use the runstep to publish to multiple destinations.
Load More
→