tag local images with latest
# 🌱|help-and-getting-started
o
I use garden to do all my container builds. For production I can use the
garden publish
functionality to publish to a remote repository but I was having trouble just tagging the latest garden build with
latest
so I can do some ad hoc testing. Anyone have any experience with doing this in an automated way?
q
@orange-ability-1812 according to our docs this should be possible with
garden publish my-container --tag "latest"
. https://docs.garden.io/reference/commands#garden-publish
o
AFAIU that is only available when using the
kubernetes
provider and not the
local-kubernetes
. The reference for
local-kubernetes
references a
deploymentRegistry
for the buildkit
buildMode
but that is a little inconsistent as it is not documented there.
For instance if I try that it tries to push to docker.io:
I guess this works:
Copy code
kind: Run
name: local-bovid-container-tag
type: exec
dependencies:
  - build.bovid-container

spec:
  command:
    - docker
    - image
    - tag
    - ${actions.build.bovid-container.outputs.localImageId}
    - ${actions.build.bovid-container.outputs.localImageName}:latest
I also realized I solved this at one point in-cluster by using skopeo. Just requires some more work to inject credentials.
I can't figure out how to get skopeo to copy within a pod on the cluster because it can't access minikube's docker daemon though... And its beyond me how to actually do that or even if its supported. So I guess I will just have a semi-duplicated task using
docker image tag ...
like above.
So to summarize I guess that would be a feature request to have support for local publishing with the
local-kubernetes
provider.
q
@orange-ability-1812 I'm writing this up as a feature request now
@orange-ability-1812 this issue has been created as https://github.com/garden-io/garden/issues/5659
o
FYI I am not a customer (yet)
q
The issue mentions you the community member and a customer we've interacted with through our Slack support channels. My intention was to add weight to the priority of the issue 🙂
2 Views