ci: test docker regestry
This commit is contained in:
@@ -1,17 +1,31 @@
|
||||
{
|
||||
description = "A simple Nix flake for testing Gitea Actions";
|
||||
description = "A simple Nix flake for testing Gitea Actions Docker build";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
# Обычный пакет
|
||||
packages.${system}.default = pkgs.hello;
|
||||
|
||||
# Docker образ
|
||||
packages.${system}.dockerImage = pkgs.dockerTools.buildImage {
|
||||
name = "test-nix-hello";
|
||||
tag = "latest";
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "image-root";
|
||||
paths = [ pkgs.hello pkgs.coreutils ];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
config = {
|
||||
Cmd = [ "/bin/hello" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user