No description
Find a file
Badi Abdul-Wahid 9f6b62f45b
images/nix: initialize env for bash
Prior the shell was not sourcing `/etc/profile.d/nix.sh` because,
although ENV is set, it will only be used if bash is invoked in
posix mode (either as `sh` or with `--posix`).
2020-06-14 12:53:29 +02:00
images images/nix: initialize env for bash 2020-06-14 12:53:29 +02:00
lib hugo: add git as a dependency 2020-02-23 17:03:28 +01:00
.gitignore hi 2019-01-19 15:13:30 +01:00
.gitlab-ci.sh generate the DockerHub image matrix 2019-02-15 14:48:42 +01:00
.gitlab-ci.yml add the nixos-20.03 channel 2020-02-23 15:09:15 +01:00
.travis.sh ci: fix Travis CI builds 2020-02-09 16:23:27 +01:00
.travis.yml add the nixos-20.03 channel 2020-02-23 15:09:15 +01:00
build release.nix -> default.nix 2019-12-17 23:35:43 +01:00
default.nix release.nix -> default.nix 2019-12-17 23:35:43 +01:00
docker-login update DockerHub info 2019-02-13 19:18:57 +01:00
dockerhub-image-matrix add the nixos-20.03 channel 2020-02-23 15:09:15 +01:00
dockerhub-metadata release.nix -> default.nix 2019-12-17 23:35:43 +01:00
LICENSE hi 2019-01-19 15:13:30 +01:00
overlay.nix devcontainer: init 2019-12-20 12:28:21 +01:00
pkgs.nix release.nix -> default.nix 2019-12-17 23:35:43 +01:00
push-all release.nix -> default.nix 2019-12-17 23:35:43 +01:00
README.md add the nixos-20.03 channel 2020-02-23 15:09:15 +01:00
shell.nix ci: fix Travis CI builds 2020-02-09 16:23:27 +01:00

docker-nixpkgs: docker images from nixpkgs

This project is a collection of docker images automatically produced with Nix and the latest nixpkgs package set. All the images are refreshed daily with the latest versions of nixpkgs.

It's also a good demonstration on how to build and publish Docker images with Nix.

Always keep your docker images fresh!

Why use Nix to build docker images?

Nix has a number of advantages over Dockerfile when producing docker images:

  • builds are more likely to be repeatable and binary reproducible
  • Nix will only rebuild the minimum set of changes with no manual intervention
  • Nix produces optimised layers with no manual intervention
  • nixpkgs provides automatic security updates

Example usage

Here is an example of using one of the docker images. Usage will change from image to image.

# run the curl image which has curl as an entry-point
$ docker run -ti --rm nixpkgs/curl curl http://ifconfig.co
180.52.248.114

List of images

Here is the current list of images that are provided. Missing one? Send an image request.

Image Description
bash CLI only
couchpotato CLI only
busybox CLI only
curl CLI only
docker-compose CLI only
kubectl CLI only
kubernetes-helm CLI only
nginx CLI only
nix nix with deps
nix-unstable nixUnstable with deps

Channels

Each image is built with the following nixpkgs channels and map to the following image tag.

The version of the packages included in each image depends on what version the nixpkgs channel describes.

Channel Image Tag Description
nixos-unstable latest latest and greated, major versions might change
nixos-20.03 nixos-20.03 next release, still baking
nixos-19.09 nixos-19.09 only minor versions that include security updates
nixos-19.03 nixos-19.03 only minor versions that include security updates

Docker Hub

All images are automatically built and pushed to Docker Hub.

Image matrix

> ./dockerhub-image-matrix

Image / Tag latest nixos-20.03 nixos-19.09 nixos-19.03
nixpkgs/bash
nixpkgs/busybox
nixpkgs/cachix
nixpkgs/caddy
nixpkgs/couchpotato
nixpkgs/curl
nixpkgs/devcontainer
nixpkgs/docker-compose
nixpkgs/hugo
nixpkgs/kubectl
nixpkgs/kubernetes-helm
nixpkgs/nginx
nixpkgs/nix
nixpkgs/nix-flakes
nixpkgs/nix-unstable

Adding new images

To add a new image to the project, create a new folder under ./images/<image-name> with a default.nix that returns the docker image.

Then run nix-build -A <image-name> to test that it builds, and then use docker load -i /nix/store/...<image-name>.tar.gz to load and test the image.

The docker-library is an image set maintained by the Docker Inc. team and contain officially-supported images.

User Feedback

Issues

If you have any problems with or questions about this project, please contact us through a GitHub issue

Image request

Submit a request with an accompanying use-case for an image that you would like to see.

Contributing

You are invited to contribute new features, fixes or updates, large or small; we are always thrilled to receive pull requests, and do our brest ot process them as fast as we can.

  • Nixery is a pretty cool service that builds docker images from nixpkgs attributes on the fly.

License

Copyright (c) 2019 zimbatm and contributors.

Licensed under the MIT.