cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.99k stars 296 forks source link

Provide a docker image #349

Open domenkozar opened 1 year ago

domenkozar commented 1 year ago
FROM nixos/nix

RUN nix-env -iA cachix -f https://cachix.org/api/v1/install
RUN cachix use devenv
RUN nix-env -if https://github.com/cachix/devenv/tarball/v0.5
mweinelt commented 1 year ago

Would be helpful to have this to run on GitLab-CI.

peteut commented 7 months ago

@mweinelt

For now I'm using flake.nix within the GitLab runner like this:

stages:
  - build

image: nixos/nix:latest

build-cli:
  stage: build
  script:
    - nix develop --experimental-features 'nix-command flakes' --impure --command bash "run-hooks"
    - nix develop --experimental-features 'nix-command flakes' --impure --command bash "build"
  tags:
    - docker
j-a-m-l commented 6 months ago

I've used this image:

FROM nixos/nix

# Install Cachix, devenv and remove unnecessary data
RUN nix-env -iA cachix -f https://cachix.org/api/v1/install \
    && cachix use devenv \
    && nix-env -if https://install.devenv.sh/latest \
    && nix-collect-garbage --delete-old \
    && nix-store --optimise
domenkozar commented 1 month ago

https://github.com/nix-community/docker-nixpkgs/pull/81

domenkozar commented 1 month ago

docker pull nixpkgs/devenv

I'm going to add docs to close this.