diff --git a/.devcontainer/Dockerfile.vscode b/.devcontainer/Dockerfile.vscode new file mode 100644 index 00000000000..cdc36067446 --- /dev/null +++ b/.devcontainer/Dockerfile.vscode @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..384f9e980bf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" + ] +} diff --git a/.gitignore b/.gitignore index 79de5e9f79c..835498bb1d2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ !.gitattributes !.gitignore !.github +!.devcontainer +!.vscode diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..4bdb6854e32 --- /dev/null +++ b/.vscode/extensions.json @@ -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", + ] +}