autogen icon indicating copy to clipboard operation
autogen copied to clipboard

[Feature Request]: Unify all docker files

Open gagb opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

Currently there are docker files in samples/docker and .devcontainer.

The former allows flexibility to specify many general Dockerfile s but the latter makes it easy to use DockerFile with vscode and Codespaces.

But because we now have two directories with Dockerfiles, as a user, now I need to decide which ones to use. And especially how to use the files in samples with vscode.

Describe the solution you'd like

We need to figure out if its possible to

  • All docker files in a single place (e.g., .devcontainer)
  • Have the docker files be compatible with both vscode, Codespaces, and other dev environments that do not use these

Additional context

Example of diverging solutions: #1275 #1241

### Tasks
- [ ] Review and Merge #1241
- [ ] Move additional docker files from samples to .devcontainer
- [ ] Update documentation to point to new setup

gagb avatar Jan 16 '24 17:01 gagb

I just tried putting the samples/dockers/Dockerfile.base in .devcontainer with the following settings and it worked with Codespaces -- I was able to rebuild the container. I think unification is possible. (cc. @sonichi @qingyun-wu for awareness)

image

Left -- copied from Dockerfile.base into .devcontainer/Dockerfile

Right -- devcontainer.json simplified to remove any vscode customizations.

gagb avatar Jan 16 '24 18:01 gagb

I suggest the following solution:

create subdir for each dockerfile in .devcontainer. This way the docker files will be compatible with both Codespaces and non-codespaces environment while minimizing duplicate locations of docker files. @r3d91ll

See #1241 for an example (modulo the vscode customizations)

gagb avatar Jan 16 '24 18:01 gagb

I suggest the following solution:

create subdir for each dockerfile in .devcontainer. This way the docker files will be compatible with both Codespaces and non-codespaces environment while minimizing duplicate locations of docker files. @r3d91ll

See #1241 for an example (modulo the vscode customizations)

Nice work. See my pull #1275 for the latest versions of the Dockerfile.full and Dockerfile.base. Aside from those two files, there was only a minor update to the Dockerfiles.md documentation with that pull. However, we may want to update the contribute and installation webpages to account for your .devcontainer setup. If this is good for you, then I'll cancel my pull request in lieu of yours.

r3d91ll avatar Jan 16 '24 21:01 r3d91ll

I suggest the following solution: create subdir for each dockerfile in .devcontainer. This way the docker files will be compatible with both Codespaces and non-codespaces environment while minimizing duplicate locations of docker files. @r3d91ll See #1241 for an example (modulo the vscode customizations)

Nice work. See my pull #1275 for the latest versions of the Dockerfile.full and Dockerfile.base. Aside from those two files, there was only a minor update to the Dockerfiles.md documentation with that pull. However, we may want to update the contribute and installation webpages to account for your .devcontainer setup. If this is good for you, then I'll cancel my pull request in lieu of yours.

Thank you for the kind words @r3d91ll! Appreciate the collaboration on this! I replied to your offer to draft in #1275. Also please see the task list I added to the top of this issue? Does it look correct? Please let me know which of these tasks are interesting and you'd like to help with. @qingyun-wu your feedback would be appreciated with this plan.

gagb avatar Jan 17 '24 16:01 gagb

@gagb @r3d91ll Very nice! The plan looks good to me!

qingyun-wu avatar Jan 18 '24 22:01 qingyun-wu