Skip to content

Commit

Permalink
Improve Dev Container
Browse files Browse the repository at this point in the history
  • Loading branch information
Master-Bw3 committed Sep 22, 2023
1 parent 55ffc02 commit cbb448b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 43 deletions.
50 changes: 21 additions & 29 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
FROM ros:noetic-ros-base-focal

RUN sudo apt-get update && \
sudo apt-get install -y software-properties-common && \
sudo apt-get update && \
sudo add-apt-repository -y ppa:git-core/ppa && \
sudo apt-get update && \
sudo apt-get install -y git python3 python3-pip python-is-python3 python3-rosdep ros-noetic-tf libeigen3-dev wget && \
sudo apt-get update && \
sudo mkdir /install-dir && \
cd /install-dir && \
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 --no-check-certificate && \
tar -xjvf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 && \
sudo python -m pip install https://github.com/purduesigbots/pros-cli/releases/download/3.1.4/pros_cli_v5-3.1.4-py3-none-any.whl

ENV PATH "$PATH:/install-dir/gcc-arm-none-eabi-9-2020-q2-update/bin/"

# install Rust toolchain
RUN sudo apt-get install curl
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-11-11 -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN sudo apt-get install clang -y


RUN echo "export PATH=/install-dir/gcc-arm-none-eabi-9-2020-q2-update/bin/:${PATH}" >> /root/.bashrc

RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc

FROM rustlang/rust:nightly-slim

ENV DEBIAN_FRONTEND=noninteractive
ENV VERSION=nightly-2022-11-11

RUN apt-get update -yqq
RUN apt-get install -yqq libclang-dev llvm-dev gcc-arm-none-eabi

RUN rustup install $VERSION
RUN rustup component add --toolchain=$VERSION rust-src rustfmt llvm-tools-preview clippy


RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-get update && \
apt-get install -y git python3 python3-pip python-is-python3 wget && \
python3 -m pip install pros-cli




25 changes: 11 additions & 14 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "VEX-rt",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"name": "vex-rt",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
Expand All @@ -15,23 +15,20 @@
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"twxs.cmake",
"ms-iot.vscode-ros",
"streetsidesoftware.code-spell-checker",
"GitHub.vscode-pull-request-github",
"DotJoshJohnson.xml",
"redhat.vscode-yaml",
"yzhang.markdown-all-in-one",
"vadimcn.vscode-lldb",
"mutantdino.resourcemonitor",
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates"
"mutantdino.resourcemonitor",
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates",
"sigbots.pros"
]
}
},
// This will launch the container as a non-root user
"runArgs": [
// This will allow you to use a ptrace-based debugger like C++
"--network=host",
Expand All @@ -40,4 +37,4 @@
"--security-opt=apparmor:unconfined"
// "--volume=/tmp/.X11-unix:/tmp/.X11-unix"
]
}
}

0 comments on commit cbb448b

Please sign in to comment.