18 lines
397 B
Plaintext
18 lines
397 B
Plaintext
|
%title Nix Docker
|
||
|
:nix:docker:devops:
|
||
|
%date 2021-04-17 03:08
|
||
|
|
||
|
I can just use docker regularly on NixOS. That's pretty cool.
|
||
|
I can use Nix to build docker images instead of a Dockerfile but that seems excessive.
|
||
|
|
||
|
```
|
||
|
{ pkgs ? import <nixpkgs> { system = "x86_64-linux"; } }:
|
||
|
|
||
|
pkgs.dockerTools.buildImage {
|
||
|
name = "hello-docker";
|
||
|
config = {
|
||
|
Cmd = [ "${pkgs.hello}/bin/hello" ];
|
||
|
};
|
||
|
}
|
||
|
```
|