Closed majelbstoat closed 6 years ago
Would an option to forge build that simply skips the push entirely work for this use case, maybe with a per profile customizable default? I think pushing to a local registry would be a noop anyways.
Yes! docker build -t blah
already creates blah:latest
locally.
I've released 0.4.3 with a new "local" type of docker registry. I think in combination with #146 that will work the best, but definitely let me know how it works out. ;-)
@rhs I cant see local option in latest release and my local insecure registry doesnt seem to be working with forge setup
║ Registry type (one of ecr, gcr, generic)[generic]:
║ Docker registry url[registry.hub.docker.com]: localhost:5000
║ Docker user (use "-" to leave unspecified): admin
║ Docker password:
║ Docker namespace/organization (enter username again for standard accounts): admin
║
║ registry: {type: docker, url: 'localhost:5000', user: admin, password: 'XXXXX' namespace: admin}
║
║ docker login -u admin -p
For a newcomer, having the "setup" function not "just work" for the local registry is really frustrating. I have a local k8s cluster running with Docker for Mac, I don't have a need for an external registry for dev. This has to be a common use case.
It's frustrating because I have to google for the issue, then I find this closed issue which tells me it's fixed, but then I see that it's not actually fixed (as of v0.4.15) because forge setup
still has no idea that local
is a valid option for Registry type. Then I find another issue pointing to the docs for creating the forge.yaml file by hand, and now I have to use that to figure out what the config file should actually look like without having any examples to go by. The documentation for the YAML file tells me about all the fields available, but doesn't actually show me an example. Are these all top level fields? Are they part of some larger configuration context?
I'm just trying out Forge for the first time and it takes an extra 15 minutes just to complete a simple Getting Started guide. I can tell a lot of effort has been put into the docs and making forge accessible to newcomers, but this seems like a bit of an oversight.
For anyone else going through the same thing, your forge.yaml
file just needs to look like this:
---
registry:
type: local
Docker for Mac now ships with Kubernetes, which can load images directly from the local Docker container cache. (Minikube can do the same.)
When developing, I don't need or want to push my dev images to GCR. I want to build, without pushing, and deploy from the local tagged build.
However, there doesn't currently seem to be a way to construct a forge.yaml such that the local Docker image cache is used. I tried
generic
with-
, but it tried to load fromhttps://-/
:joy: