gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.75k stars 1.22k forks source link

Feature idea: Support second Dockerfile for user specific environment configuration #6668

Closed behrica closed 2 years ago

behrica commented 2 years ago

Is your feature request related to a problem? Please describe

As a project maintainer I want to describe the minimal development environment AND as a contributor I want to "add" to the minimal dev environment my development tools.

Describe the behaviour you'd like

I want to be able to "add" anything to the minimal project dev environment Maybe a rather simple way to do this would be allow a "project specific" Dockerfile (as now) and a additional user specific Dockerfile.

And they get "pasted" together in some form. (one after the other) This would of course result in several images per project....

Maybe a too crazy idea.

But it would be easily "testable" by the user, so maybe not too crazy.

Main issue would be on how / where to store the second docker file and how to relate it to a certain user/project. Sounds like a "project specific" user setting. (something not commited in git)

Describe alternatives you've considered

".dotfiles" as proposed here Any other form of "Docker adding layers", not sure how.

Additional context

There are some discussion to solòve this on Docker level. To add some form of "include" to Docker.

But maybe it is more logical to solve this for Gitpod only.

behrica commented 2 years ago

I came to the idea by having created a .gitpod.Dockerfile for one project, and I realised that I have the 2 parts.

  1. project specific
  2. user specific (I want to use emacs)

See comments here: https://github.com/behrica/my-gitpod-template/blob/main/.gitpod.Dockerfile

behrica commented 2 years ago

Maybe the issue of "where to store the information of the second Dockerfile" could be solved by extending the gitpod.yml and allowing a section with "one line per git pod useraccount" which points to a Dockerfile somewhere.

gitpodUserId:   carsten.behring
secondDockerFile: http://gist...xxxx../.Dockerfile
gitpodUserId:   other user ....
secondDockerFile: http://gist.yyyy..../.Dockerfile

Out of this gitpod would build 2 dockerfiles / dockerimages.

  1. append Dockerfile + http://gist...xxxx../.Dockerfile
  2. append Dockerfile + http://gist.yyyy..../.Dockerfile

This would increase the number of overall images (a lot), but I suppose you have a way to cache/uncache them anyway

behrica commented 2 years ago

Eventually related to this: https://github.com/gitpod-io/gitpod/issues/6109

behrica commented 2 years ago

I found more related issues / feature requests on "custom IDE". Like: https://github.com/gitpod-io/gitpod/issues/2419

Maybe this proposal here, can be used for "custom IDE" (as my Emacs example above), but not only.

But indeed the more abstract use case for my proposal is "custom IDE" as well.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

loujaybee commented 1 year ago

@behrica did dotfiles support: https://www.gitpod.io/docs/configure/user-settings/dotfiles help you here?

Or, is there anything else you'd need?