1
0
Fork 0
This repository has been archived on 2025-03-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compiler-course/docker.nix

24 lines
605 B
Nix
Raw Normal View History

2025-01-16 04:06:59 +02:00
let
pkgs = import <nixpkgs> { };
compiler-project = import ./default.nix { rustPlatform = pkgs.rustPlatform; };
source-code = builtins.fetchGit {
url = "https://gitea.vsinerva.fi/VSinerva/compiler-course.git";
name = "compiler-course-src";
ref = "main";
};
in
pkgs.dockerTools.buildImage {
name = "compiler-course-docker";
copyToRoot = pkgs.buildEnv {
name = "project-source";
paths = [ source-code ];
extraPrefix = "/Project_Source";
};
config = {
ExposedPorts = {
"3000/tcp" = { };
};
Cmd = [ "${compiler-project}/bin/compiler-course" ];
};
}