-
Notifications
You must be signed in to change notification settings - Fork 134
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
devcontainers #358
devcontainers #358
Conversation
All scripts are ready now, same as images. Each template folder has Dockerfile for respective container and sample conan profile. Unfortunately, the variety of platforms and system setups makes it almost impossible to write universal profile, so these ones are kind of references. Conan is not a must to use anyway, images are built with all dependencies satisfied. I've added docs to each piece, tested it with common uses. Sadly, as you mentioned, maintaining this is tough and I don't see an easy way to automate testing for now. Let me know your thoughts, @riebl. |
Thanks for your efforts! It looks quite good after a first quick checkup. Please give me some more time, because I would like to play with it as soon as I am back from my business trip. Does it have any particular benefit to support multiple base images for the DevContainer setup? |
Of course, no problem :)
|
Looks like mounting XAUTHORITY temporary file was a bad idea since it is generated on boot with random name, and docker does not allow recreating mounts. The only solution I found was this: Also did 3) #358 (comment) |
By the way: VSCode resets extensions in devcontainer on every reload unless you specify them like this: "customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance",
"waderyan.gitblame",
"twxs.cmake",
"llvm-vs-code-extensions.vscode-clangd"
]
}
} You can add them with Extensions UI, too :) |
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 am even considering switching over to the new dev containers :-)
Some step-by-step usage instructions for beginners are still needed, though.
Great work and looking forward to your replies to my comments!
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.
Looks good! I am currently testing some different setups, e.g. what happens when running Wayland on the host system instead of X11.
Furthermore, I am thinking about moving some files:
devcontainers/templates/*/Dockerfile
to.devcontainer/*/Dockerfile
devcontainers/templates/*/x86-64.ini
toconan/*-x86_64.ini
devcontainers/build.py
to the root directorydevcontainers/conanfile.py
either to root directory or toconan
subdirectory
Motivation: Except for the Dockerfiles, the files in devcontainers are not limited to devcontainers.
I think wayland has different unix socket we'll need to connect to. Might be better to structure our folders like this, then:
|
Something is still a little bit odd: I can remove all the /tmp/.X11-unix, DISPLAY and xhost snippets from the Arch Linux devcontainer.json and still run /sumo/bin/sumo-gui without problems even with Wayland. In fact, the VSCode DevContainer extension is expected to handle the X11 magic nowadays. |
maybe sumo version is too new? |
…ith project's root directory
Okay, I think this PR is ready for merging. I still don't know why the X11 display requires the explicit configuration with Debian but not Arch Linux, but we can improve this later on. |
It does ;) |
Hey,
Here is my proposal for devcontainers.
Folder structure:
build.py is optional here, one might just use regular CMake commands to achieve the same result. Conan is optional, too - template images should provide required packages. Although I suppose it is a good idea to allow picking specific versions with it.
@riebl, I would appreciate your feedback on this structure.