-
Notifications
You must be signed in to change notification settings - Fork 504
provide a fabric8 goal to run a docker container as if its inside a kubernetes environment #3619
Comments
this relates to https://github.com/rhuss/docker-maven-plugin/issues/119 as well - if we're a really fast way to spin up a docker container using a local build; we'd want to set the env vars properly so it can reuse the kubernetes configuration and services |
I wonder, as this is mostly about setting env vars - if we could somehow have a tool to generate the env vars for a namespace to a temporary local file - that the docker plugin could reuse? e.g. we generate target/docker/envVars.properties or something which the docker:run maven plugin reuses if its present (and enabled) to set the env vars when running things? As mostly all those env vars should be static for a single namespace (once the services are all created) |
I just raised this issue on docker-maven-plugin to make it easier to pass in a file for the environment variables https://github.com/rhuss/docker-maven-plugin/issues/128 for times when we want to generate environment variables programatically - e.g. via using the REST API on a remote kubernetes environment |
Maybe we need to generate 2 files for the kubernetes services environment variables
then folks could type:
to then have their local environment variables defined as if they are running inside kubernetes; so that folks could use "mvn exec:java" and the like... |
We don't need to use maven properties plugin. Since we create a mojo of our own, to create the properties file, that mojo can also set the properties to "project properties". Then the docker maven plugin can find them. |
its gonna be handy to run a local docker build as if it were part of a kubernetes cluster; but without having to push the image onto kubernetes and create a Replication Controller using it etc.
i.e. just run a single docker container as if its been created by a Replication Controller.
Mostly thats just
I guess DNS should fix the service IPs thing ultimately? Or maybe this only works for services with a route?
The text was updated successfully, but these errors were encountered: