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

View File

@ -1,26 +1,25 @@
{
"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.
"dockerFile": "Dockerfile",
"runArgs": [
],
"context": ".",
"build": {
"dockerfile": "Dockerfile"
},
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
// Keep command history
"source=n64flashcartmenu-bashhistory,target=/commandhistory,type=volume"
],
"postCreateCommand": "git submodule update && cd ./libdragon && ./build.sh",
"customizations": {
"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": [
"ms-vscode.cpptools",
"ms-vscode.makefile-tools",
"ms-vsliveshare.vsliveshare-pack",
"streetsidesoftware.code-spell-checker",
"ms-vscode.makefile-tools"
"streetsidesoftware.code-spell-checker"
],
"settings": {
"git.ignoredRepositories": [
"libdragon"
]
}
}
}
}