-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create devcontainer.json #3698
Create devcontainer.json #3698
Conversation
Hello! |
links to some documentation would also be useful |
@@ -0,0 +1,5 @@ | |||
{ | |||
"image": "mcr.microsoft.com/devcontainers/universal:2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer we would use mcr.microsoft.com/devcontainers/go:1.22-bullseye
with features required for woodpecker development like ghcr.io/devcontainers/features/node:1
with same node version we use in pipelines etc
This would allow developing woodpecker without needing to install development tools (go, node etc) on your pc, VSCode would detect and ask to switch to devcontainer mode where it starts vscode instance in container that is build based on this file. More info in https://containers.dev/ Would be nice so that would also allow setting up test gitea instance etc to work with but this is not prerequesite for this PR |
Would be great to have the same setup as we use for gitpod. Shouldn't be actually to tough to achieve using devcontainers with a docker-compose file. |
can containers use nix flakes? if so, we can use the flake to maintain the dependencys |
Do we really need yet another dev environment? |
devcontainers are supported out of the box in vscode (github codespaces and other services also use it), it has more compatibility between different tools not like gitpod or nix that works only with specific environment devcontainers can be used in win/linux/mac and does not depend on any external service like gitpod |
Sure, it's probably a great tool but we can't just add new config files for every dev env. Even if there are multiple tools supporting it. If there's one file that is supported by all tools that would be fine, but how it's now we just add new envs. Does gitpod support devcontainers so we could replace the gitpod config? |
Personally I don't use gitpod as I don't see any reason for me to use it (it's external commercial cloud, requires special plugin and registration etc). Devcontainers can be used in GitHub to do quick development and contributions thus more easy to use: VSCode does not require any external services at all (just VSCode and Docker), have not used but I think IntelliJ also supports devcontainers out of the box. There are also multiple open source tools that allow to use devcontainers having just docker and this tool installed (ex daytona.io or devpod.sh ) Nix is nice but also requires to have nix/nixos and works only for linux but it's small config so not that it's hard to maintain. So I would vote for droping gitpod and replacing it with devcontainers |
So it looks like gitpod does not support devcontainers: gitpod-io/gitpod#7721
I think I agree at this point, still I'm not a big fan of these environment configs. |
Well we can move forwarx with this and remove you custom made 'in_docker' makefile target Line 44 in 402e357
Also the related dockerfile to build the dev env can be used here for this ... |
and we could reuse nix: https://github.com/xtruder/nix-devcontainer |
does not look very standard way to use devcontainers and not sure it works in github codespaces |
Well it either works or the devcontaier prommise is broken |
in cloud based environments there could be some problems with specific used mounts/volumes and security options used there |
I'll make a test :) |
Started some testing here: main...anbraten:woodpecker:dev-container Mainly missing the env var setup |
I'll close this as the original opener does not respond. If we want to add it please open a new pr |
No description provided.