ghcr.io/aloshy-ai/nixcontainer:latest
Add this to your .devcontainer/devcontainer.json
:
{
"image": "ghcr.io/aloshy-ai/nixcontainer:latest",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"workspaceFolder": "/workspace"
}
The container is configured with /workspace
as the default working directory and mount point for your project files. This ensures:
- Your local files are mounted into the container at
/workspace
- VS Code opens directly in your project directory
- All development tools work with the correct file paths
This project uses devbox to manage its development environment.
Install devbox:
curl -fsSL https://get.jetpack.io/devbox | bash
Start the devbox shell:
devbox shell
Run a script in the devbox environment:
devbox run <script>
Scripts are custom commands that can be run using this project's environment. This project has the following scripts:
The Shell Init Hook is a script that runs whenever the devbox environment is instantiated. It runs
on devbox shell
and on devbox run
.
gh auth status &>/dev/null || gh auth login
export GITHUB_TOKEN=$(gh auth token)
export GITHUB_USERNAME=$(gh api user | jq -r .login)
echo "▄▀█ █░░ █▀█ █▀ █░█ █▄░█ ░ ▄▀█ █
█▀█ █▄▄ █▄█ ▄█ █▀█ █░▀█ ▄ █▀█ █"
devbox run --list
nix build
nix build .#loadImage && ./result/bin/load-image
nix build .#pushToGhcr && GITHUB_USERNAME=$GITHUB_USERNAME GITHUB_TOKEN=$GITHUB_TOKEN ./result/bin/push-to-ghcr