Open ericglau opened 4 years ago
Conclusion is we should do this, it isn't an MVP for dev mode with containers, but since we have s2i support dev mode without a docker container would be useful provided we have development fidelity with the s2i images.
For dev mode, container support https://github.com/OpenLiberty/ci.maven/blob/master/docs/dev.md#devc-container-mode currently requires that the user provide a Dockerfile. This Dockerfile is required for specifying the application and all relevant configuration to include into the container image, so that the same Dockerfile can be used for both dev and production. The user should not need to add or change anything in their Dockerfile when moving to production, so dev and production environments can be kept close to parity.
Should we also provide an enhancement to allow running dev mode with container support without a Dockerfile?
This would make it easier to get started with initial development when targeting containers, and dev mode would use the server configuration directly from the Maven/Gradle build's output.
However, users would eventually need to write a Dockerfile before they move towards production, and users may run into issues at that point (due to different environments, or due to what configuration files they choose to include in their image).
Proposal: No, do not support the scenario with a Dockerfile. Instead, provide an easy way for users to get a default Dockerfile (e.g. point to Liberty starter or best practice documentation).
Motivation for Yes: in IDE plugins, choose “Start in container” If no Dockerfile exists, currently it gives an error saying you need a Dockerfile. Would be easier if it was seamless (generate/download a Dockerfile for you).