-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VSCode : Enable Development inside Docker Container
This will enable seamless Development of optee_os Project with VSCode inside Docker container. The VSCode Container provides: * Automatic Mapping of the host user UID/GID inside the container * GCC Cross-Compilers (aarch64/armhf/riscv64) * 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]>
- Loading branch information
1 parent
461cf00
commit 9f34db3
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt update && apt upgrade -y && apt-get install -y \ | ||
build-essential \ | ||
autoconf \ | ||
bc \ | ||
bison \ | ||
ccache \ | ||
clang \ | ||
lld \ | ||
cmake \ | ||
codespell \ | ||
device-tree-compiler \ | ||
expect \ | ||
flex \ | ||
gcc-aarch64-linux-gnu \ | ||
gcc-arm-linux-gnueabihf \ | ||
gcc-riscv64-linux-gnu \ | ||
gdb-multiarch \ | ||
gdisk \ | ||
gettext \ | ||
libncurses5 \ | ||
libssl-dev \ | ||
lsb-release \ | ||
python3 \ | ||
python3-pip \ | ||
python3-cryptography \ | ||
python3-pycodestyle \ | ||
python3-pycryptodome \ | ||
python3-pyelftools \ | ||
sudo \ | ||
uuid-dev \ | ||
wget \ | ||
curl \ | ||
git-core \ | ||
git-man \ | ||
git-email \ | ||
sudo \ | ||
nano \ | ||
vim \ | ||
openssh-client \ | ||
bash-completion | ||
|
||
# Add non root user | ||
RUN useradd -ms /bin/bash optee | ||
RUN echo "optee ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers | ||
USER optee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "optee-os-docker", | ||
"build": { | ||
"dockerfile": "Dockerfile.vscode" | ||
}, | ||
|
||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash", | ||
"args": ["-l"] | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "bash" | ||
}, | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
}, | ||
|
||
// Map the host .ssh folder into the container for a seamless ssh experience | ||
"mounts": [ | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/optee/.ssh,type=bind,consistency=cached" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ | |
!.gitattributes | ||
!.gitignore | ||
!.github | ||
!.devcontainer | ||
!.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode-remote.remote-containers", | ||
"ms-vscode-remote.remote-wsl", | ||
"ms-vscode-remote.vscode-remote-extensionpack", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.cpptools", | ||
"eamodio.gitlens", | ||
] | ||
} |