cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
4.53k stars 339 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 10 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 9 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 4 months ago

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

domenkozar commented 4 months ago

docker pull nixpkgs/devenv

I'm going to add docs to close this.