Improve devcontainer

Co-Authored-By: Mateusz Faderewski <kontakt@mateuszfaderewski.pl>
This commit is contained in:
Robin Jones 2023-04-01 00:58:59 +01:00
parent f366bb7e78
commit 4e3699cba7
2 changed files with 25 additions and 33 deletions

View File

@ -1,20 +1,13 @@
FROM ghcr.io/n64-tools/gcc-toolchain-mips64:latest FROM debian:stable-slim
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get upgrade -y && \
python3 \ apt-get install build-essential git libpng-dev python3 wget -y && \
python3-serial \ wget https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-x86_64.deb && \
python3-pil dpkg -i gcc-toolchain-mips64-x86_64.deb && \
rm gcc-toolchain-mips64-x86_64.deb && \
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.14.0/sc64-deployer-linux-v2.14.0.tar.gz && \
&& echo "$SNIPPET" >> "/root/.bashrc" tar -xf sc64-deployer-linux-v2.14.0.tar.gz -C /usr/local/bin && \
rm sc64-deployer-linux-v2.14.0.tar.gz && \
# TODO: Really we want to use the sub module in /workspaces/N64FlashcartMenu/libdragon SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
RUN git clone --branch trunk https://github.com/dragonminded/libdragon.git --depth 1 ./sources/libdragon echo "$SNIPPET" >> "/root/.bashrc"
RUN cd ./sources/libdragon && \
make -j libdragon && \
make install && \
make -j tools && \
make tools-install && \
make install-mk

View File

@ -1,26 +1,25 @@
{ {
"name": "N64FlashcartMenu", "name": "N64FlashcartMenu",
// If you prefer, you can use the source files and adjust them they are located, with the same names in ./sources. This will alow you to customize them and add anything you may need on top. "build": {
"dockerFile": "Dockerfile", "dockerfile": "Dockerfile"
"runArgs": [ },
],
"context": ".",
"mounts": [ "mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
// Keep command history
"source=n64flashcartmenu-bashhistory,target=/commandhistory,type=volume" "source=n64flashcartmenu-bashhistory,target=/commandhistory,type=volume"
], ],
"postCreateCommand": "git submodule update && cd ./libdragon && ./build.sh",
"customizations": { "customizations": {
"vscode": { "vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [ "extensions": [
"ms-vscode.cpptools",
"ms-vscode.makefile-tools",
"ms-vsliveshare.vsliveshare-pack", "ms-vsliveshare.vsliveshare-pack",
"streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker"
"ms-vscode.makefile-tools" ],
] "settings": {
"git.ignoredRepositories": [
"libdragon"
]
}
} }
} }
} }