[Suggestion] Support adding Dockerfile in CLI
shahabganji opened this issue · comments
I'm submitting a feature request
-
Current behavior:
There is no support. -
What is the expected behavior?
I expect to have an option in the CLI menus asking whether the developer wants aDockerfile
to be added to the project's folder. It should be based on the configuration selected by the developer during the setup of the project. -
Motivation
We all heard about micro-services
, DevOps
and their friends like CI/CD
.
By being able to dockerize our Aurelia application we look at it like a separate micro-service
which could be individually deployed
, fills the gaps between development
and operations
, and being able to continuously
deliver the release of the application to production, while we could make sure that an app which runs on developers machine also runs with no error on other machines, test, and production, for instance.
By having a docker file, which helps developers to have production-ready-optimized images or development images, we encourage the developers of the community to embrace the above-mentioned cultures and approaches with comfort 😉
Using this Dockerfile
in conjunction with docker-compose
could help developers to run multiple services that depend on one another in just one command, moreover running unit-test, building, and deploying apps all become easier.
Let's see an example, consider a situation that I have an Aurelia application in my front-end and some microservices at the back-end, to test, and run the apps I need to run each one individually, taking care of which is depending on which, and many other considerations, if I'll be able to have a Dockerfile
for each of them and my aurelia application as well, I could have a docker-compose
file like the following:
version: "3.7"
services:
product:
image: product:dev
build:
context: ./products-service
dockerfile: Dockerfile
ports:
- "8080:80"
environment:
- "ASPNETCORE_ENVIRONMENT: Development"
sales:
image: sales:dev
build:
context: ./sales-service
dockerfile: Dockerfile
ports:
- "8081:80"
environment:
- "ASPNETCORE_ENVIRONMENT: Development"
front:
image: fron_end_aurelia:dev
build:
context: ./front-end-spa
dockerfile: Dockerfile
ports:
- "9000:9000"
mail:
image: some_test_mail_image
ports:
- "8025:8025"
and just with a docker-compose up
we could have our Aurelia application as well as all backend services tested, and run inside docker with separate containers. All the same for all teams, development, test, operation and so on.
au dockerize
could also be a command for building a Docker image from the current context.
/cc @EisenbergEffect , @fkleuver
Let's do it! 🚀