Vita2HOS development environment in a docker container
Please read the following Github Docs:
- Authenticating to the Container registry
- Pulling container images
- Note: This is an optional step, since the image will be automatically pulled once you try to use/run it
-
Pull the dev container image:
ghcr.io/vita2hos/devcontainer/vita2hos
-
Create a
.devcontainer.json
in the root of your project and add the following content to it:{ "image": "ghcr.io/vita2hos/devcontainer/vita2hos" }
-
Now open your project in VSCode and you should be able to reopen the folder using the dev container!
If you want to get more information about dev container have a look at this.
sudo docker run --rm -it -v $(pwd):/vita2hos ghcr.io/vita2hos/vita2hos-dev:<tag>
# a new bash will be spawned
cd /vita2hos
make -j $(($(nproc) - 2))
exit
Or as a one-liner:
sudo docker run --rm -it -v $(pwd):/vita2hos ghcr.io/vita2hos/vita2hos-dev:<tag> bash -c "cd /vita2hos ; make -j $(($(nproc) - 2))"
-
Run this command to build the image and add the tag
vita2hos-dev
to itsudo DOCKER_BUILDKIT=1 docker build --ssh default=${SSH_AUTH_SOCK} --build-arg MAKE_JOBS=$(($(nproc) - 2)) -t vita2hos-dev .