A docker image to use nix/nixpkgs/nix-shell on debian (useful a ci+local image)
5.5K
A OCI / Docker image to be able to run nix-shell (or other nix tool) over a debian image (and not a nixos image).
# docker build -t nix-on-debian:latest .
docker run -it --rm -v $PWD:/workspace -w /workspace -t davidb31/nix-on-debian:latest
# inside container
# create add-hox nodejs env and run `node --version` inside
nix-shell -p nodejs --run 'node --version'
exit
shell.nix into your projectnix-shell --run 'build_my_stuff'Into a github-actions it will looks like:
name: ci
on: [push]
jobs:
build:
runs-on: ubuntu-latest
container: davidb31/nix-on-debian:latest
steps:
- uses: actions/checkout@v1
- name: First run of nix-shell to measure download time
run: nix-shell --run 'echo load shell'
- name: lint and test
run: nix-shell --run 'bazelisk test //...'
- name: demo of multi-line command
run: |
nix-shell --run '
echo "command 1"
echo "command 2"
'
see folder /examples and .github/workflows/examples.yaml
Other how to reproduce and debug CI locally.
// TODO
$HOME/.profileContent type
Image
Digest
Size
105.6 MB
Last updated
over 5 years ago
docker pull davidb31/nix-on-debian