Docker init - CLI command to create all docker related files in a project folder · Issue #453 · docker/roadmap (original) (raw)

Tell us about your request
It would be cool to have something like docker init. This command would create all docker-related assets in my project folder, with some smart defaults for me to change to my liking. It would be nice if it could detect what my stack is, and create all the required files in one go.

Which service(s) is this request for?
Docker CLI

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Right now, I need to manually write Dockerfiles, and compose files when using Docker in my project. I feel like a lot of my time would be cut-short by a docker init command that creates these files for me. I would be even better if it can detect what kind of code is there in my repository and pre-fill these files with commonly used configurations. I would then tweak it to my liking.

Are you currently working around the issue?
Currently, I am googling common Dockerfiles for the stack I use. Once I have one, I'm manually creating some docker assets in my project.

Additional context

Detected an Angular project...

Would you like to setup Docker for your Angular project?
► Yes, Continue
  No, Pick from a list of templates
  Quit
Setting up Docker for your Angular project...

CREATE .dockerignore
CREATE Dockerfile
CREATE compose-dev.yaml
CREATE docker-compose.yaml

✔ Docker is setup for your Angular Project at /source/my-angular-project

Run docker compose up to get started