about summary refs log tree commit diff
path: root/pkgs/build-support/docker
AgeCommit message (Collapse)AuthorFilesLines
2022-05-30dockerTools.examples.etc: Make it a reliable testRobert Hensing1-2/+2
/etc/hosts is generally also provided by the container runtime.
2022-05-30dockerTools: Add example of using NixOS' etcRobert Hensing1-0/+41
(cherry picked from commit 9b2af8673be82d48ce76c8c152de85ad921d26ba)
2022-05-05testers.invalidateFetcherByDrvHash: Move from top-levelRobert Hensing1-1/+1
2022-04-16treewide: remove nativeBuildInputs that are in stdenvBen Siraphob1-2/+1
2022-04-05dockerTools: misc fixeszowoq1-4/+14
- add nixosTests to `dockerTools.tests` - don't use `pkgs` or `lib.singleton`
2022-04-05dockerTools: pkgs.system -> pkgs.stdenv.hostPlatform.systemzowoq1-1/+1
`pkgs.system` is an alias
2022-03-24fakeNss: move to toplevelFlorian Klink1-19/+2
Make this reachable from pkgs.fakeNss. This is useful outside docker contexts, too. https://github.com/NixOS/nixpkgs/pull/164943#discussion_r833220769
2022-01-31streamLayeredImage: pass through passthru attributesVincent Ambo1-1/+3
This is useful for a use-case we have with a Nix-based CI system that specifies things like deploy steps as passthru attributes[0]. Previously the only way to do this would have been to concatenate attributes onto the resulting derivation, but passing them in and actually treating them as proper passthru attributes is cleaner. [0]: https://cs.tvl.fyi/depot@f7d7da6aceb407b719cf4683a75878fd3aca319e/-/blob/nix/buildkite/default.nix?L222-226
2021-12-17nixos/tests/docker-tools: add test for pre-runAsRoot layer unpack orderAndrew Brooks1-0/+23
2021-12-17dockerTools.buildImage: unpack base image layers in correct orderAndrew Brooks1-1/+1
2021-12-04dockerTools: Keep fakechroot disabled by defaultRobert Hensing2-1/+3
Avoid risk of breaking existing images by making it opt-in.
2021-12-04dockerTools: Add fakechroot to fakeRootCommandsRobert Hensing2-4/+35
2021-12-03Merge pull request #148341 from ↵Robert Hensing2-2/+10
hercules-ci/add-dockerTools-customization-layer-dependencies dockerTools: Add store dependencies of the customization layer
2021-12-02nixosTests.docker-tools: Use unique binary in test caseRobert Hensing1-1/+5
2021-10-27Merge pull request #142616 from r-burns/toplevel-systemRyan Burns1-2/+0
treewide: remove toplevel `system` attr
2021-10-25dockerTools: Fix testRobert Hensing1-0/+1
2021-10-22build-support/docker: remove toplevel system attrRyan Burns1-2/+0
2021-10-18dockerTools: Fix and test #118722 path in contentsRobert Hensing2-1/+18
2021-10-06dockerTools: Add store dependencies of the customization layerRobert Hensing2-2/+6
2021-09-29Merge pull request #139892 from hercules-ci/dockerTools-test-pullImageRobert Hensing1-0/+9
dockerTools: test pullImage
2021-09-29dockerTools: Test pullImage fetcher whenever its implementation changesRobert Hensing1-0/+9
2021-09-29dockerTools.exportImage: Make $out a tarball againRobert Hensing1-0/+6
2021-09-29dockerTools.runWithOverlay: Avoid cluttering $out and copyingRobert Hensing1-12/+2
2021-09-29dockerTools: fix exportJustin Bedo1-3/+7
2021-09-29docker-tools: add example for exportImage functionality and testJustin Bedo1-0/+3
2021-09-10use --verbatim-files-from in dockerToolsdivanorama1-1/+1
https://www.gnu.org/software/tar/manual/html_node/files.html files starting with - can be treated as command line options, which isn't desirable here
2021-08-25dockerTools.usrBinEnv: addFlorian Klink1-0/+7
This provides a /usr/bin/env, for shell scripts using the "/usr/bin/env executable" shebang.
2021-08-20dockerTools.fakeNss: add /etc/nsswitch.conf (#134958)Florian Klink1-0/+3
Apparently, a non-existent nsswitch.conf causes a very misleading host resolution, differing from the defaults people are used to. According to https://github.com/golang/go/issues/22846#issuecomment-346377144, glibc says the default is "dns [!UNAVAIL=return] files". This means, `/etc/hosts` isn't really honored, causing all sorts of unexpected behaviour. Let's prevent this, and first ask `/etc/hosts` before querying DNS, like we do on NixOS too.
2021-08-15treewide: runCommandNoCC -> runCommandRobert Hensing1-1/+1
This has been synonymous for ~5y.
2021-08-14dockerTools.pullImage: fix for skopeo 1.4.xLuke Granger-Brown1-2/+3
skopeo 1.4.x doesn't accept --src-tls-verify as a flag to the *program*, only as a flag to copy; we must pass it after the "copy" verb, or it will fail with: > FATA[0000] unknown flag: --src-tls-verify
2021-08-10docker: formatSandro Jäckel1-473/+495
2021-08-05Merge pull request #132626 from zowoq/tarsumRobert Hensing2-19/+44
tarsum: init
2021-08-05tarsum: initzowoq2-19/+44
- move from dockerTools.tarsum - remove go from runtime closure
2021-08-04dockerTools.buildImage: Allow build on darwin (#132640)Robert Hensing1-2/+0
Indeed Docker can not run darwin exes, but darwin can build Docker images, as some users already do with buildLayeredImage.
2021-07-08dockerTools.tarsum: use current gozowoq1-0/+1
2021-07-03dockerTools.pullImage: force disable skopeo's progress barLuke Granger-Brown1-1/+2
skopeo will disable the progress bar if it detects that stdout isn't a TTY - in order to make it think that stdout _isn't_ a TTY and therefore avoid it printing a lot of "…" on separate lines, we pipe the output through cat. This changes the output from: … … … … … … to the eminently more useful and less spammy: Getting image source signatures Copying blob sha256:[snip] Copying blob sha256:[snip] Copying blob sha256:[snip] Copying config sha256:[snip] Writing manifest to image destination Storing signatures
2021-06-10Merge pull request #125223 from hercules-ci/fix-dockerTools-example-fetch-shaRobert Hensing1-1/+1
nixosTests.docker-tools: Fix nixFromDockerHub example sha
2021-06-02Merge pull request #125216 from hercules-ci/follow-up-115491Robert Hensing1-1/+1
dockerTools: Fix passthru image tag
2021-06-01nixosTests.docker-tools: Fix nixFromDockerHub example shaRobert Hensing1-1/+1
For https://github.com/NixOS/nixpkgs/pull/125211 I tried to test the fetcher with nix-build -A dockerTools.examples.nixFromDockerHub --option substitute false But it failed. I haven't figured out the cause, but the outputs match, so it's probably the hashing method (flat/recursive) that changed at some point. (The names did match.)
2021-06-01Merge pull request #125211 from edwtjo/docker-fetch-wotlsRobert Hensing1-1/+9
build-support/docker: pass tlsVerify to support http registries
2021-06-01dockerTools: Fix passthru image tagRobert Hensing1-1/+1
It should match the actual image tag. This fixes the problem introduced in 00996b5e03f33bebafc2b17c41a175d3726a9bde https://github.com/NixOS/nixpkgs/pull/115491#pullrequestreview-672789901
2021-06-01build-support/docker: pass tlsVerify to support http registriesEdward Tjörnhammar1-1/+9
2021-05-26dockerTools: Allow omitting all store pathsRobert Hensing2-1/+36
Adds includeStorePaths, allowing the omission of the store paths. You generally want to leave it on, but tooling may disable this to insert the store paths more efficiently via other means, such as bind mounting the host store.
2021-05-26dockerTools: FormatRobert Hensing1-1/+1
2021-04-16Merge pull request #118018 from considerate/masterRobert Hensing2-0/+55
dockerTools: Implement merging of image tarballs
2021-04-12Merge pull request #102725 from thefloweringash/dockertools-procJörg Thalheim1-1/+5
dockerTools: fix absent /proc during runAsRoot
2021-04-08dockerTools: add merged example imagesViktor Kronvall1-0/+19
2021-04-07dockerTools: preserve order of images in manifestViktor Kronvall1-4/+13
2021-04-07dockerTools: take a list of images in mergeImagesViktor Kronvall1-17/+16
2021-04-07dockerTools: Implement merging of image tarballsViktor Kronvall1-0/+28
The `docker load` command supports loading tarballs that contain multiple docker images with their respective image names and tags. This enables distributing these images as a single file which simplifies the release of software when an application requires multiple services to run. However, pkgs.dockerTools only create tarballs with a single docker image and there exists is no mechanism in nixpkgs to combine the created tarballs. This commit implements merging of tarballs in a way that is compatible with `docker load`.