-
Notifications
You must be signed in to change notification settings - Fork 241
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
VSCode : Enable Development inside Docker Container #385
Conversation
f46c3aa
to
7c5025d
Compare
Hello @embetrix, That looks useful, but could you give more information in the commit description? Such as how this is typically used in a development environment. I do not ask for a very detailed documentation but a few commands and explanations on the steps that are involved to build and run the project. Thanks! |
00c868b
to
3543148
Compare
@jforissier : I added some information, normally everthing should be automatically set by VSCode just by accepting the extension recommendations and openning the project inside the container. |
f8b4390
to
9be779e
Compare
@jforissier any update ? |
Dockerfile
Outdated
RUN echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse' > /etc/apt/sources.list | ||
RUN echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse' >> /etc/apt/sources.list | ||
RUN echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse' >> /etc/apt/sources.list | ||
RUN echo 'deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse' >> /etc/apt/sources.list |
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.
Why is this needed? Isn't this in the ubuntu:22.04 image already?
Dockerfile
Outdated
uuid-dev:armhf \ | ||
uuid-dev:arm64 |
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.
In https://optee.readthedocs.io/en/latest/building/prerequisites.html we have uuid-dev
(host architecture). Why are :armhf
and :arm64
needed?
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 took all those from CI Dockerfile: https://github.com/OP-TEE/optee_client/blob/master/ci/Dockerfile.ubuntu, I just extended it to include additional dev tools.
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.
OK now I remember, they are required for the CMake build which uses pkg-config
for cross-compilation.
.devcontainer/devcontainer.json
Outdated
{ | ||
"name": "optee-client-docker", | ||
"build": { | ||
"dockerfile": "../Dockerfile" |
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.
Could we rename this file to Dockerfile.vscode
and store it here under .devcontainer/
?
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.
sure
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.
done
Dockerfile
Outdated
uuid-dev:armhf \ | ||
uuid-dev:arm64 |
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.
OK now I remember, they are required for the CMake build which uses pkg-config
for cross-compilation.
9be779e
to
75eadaf
Compare
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.
Acked-by: Jerome Forissier <[email protected]>
Thanks!
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
@jforissier any update on this ? it was somehow closed ! |
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.
Please see comment below. Thanks.
This will enable seamless Development of optee_client Project with VSCode inside Docker container. The VSCode Container provides: * Automatic Mapping of the host user UID/GID inside the container * Cross-Compilers (aarch64/armhf) * GDB Multiarch for Debugging * Remote SSH on the Target with seamless ssh mapping of the Host inside the container (Linux/Windows WSL) * Git and Git Extensions to work and send Patches Note: This require Docker installation for Linux/or Windows : [1] https://docs.docker.com/engine/install VSCode Extensions (extensions.json) will be recommended for the installation For more Information : [2] https://code.visualstudio.com/docs/devcontainers/containers [3] https://www.youtube.com/watch?v=C_5tDWsWSj0 [4] https://www.youtube.com/watch?v=b1RavPr_878 Signed-off-by: Ayoub Zaki <[email protected]> Acked-by: Jerome Forissier <[email protected]>
75eadaf
to
fbd584e
Compare
This will enable seamless Development of optee_client Project with VSCode
inside Docker container.
The VSCode Container provides:
Note: This require Docker installation for Linux/or Windows :
[1] https://docs.docker.com/engine/install
For more Information :
[2] https://code.visualstudio.com/docs/devcontainers/containers
[3] https://www.youtube.com/watch?v=C_5tDWsWSj0
[4] https://www.youtube.com/watch?v=b1RavPr_878