devcontainers: update to use custom buildEnv step

This commit is contained in:
Gabriel Arazas 2024-10-26 22:51:24 +08:00
parent 2273aa0f7f
commit f0d59f6c97
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 19 additions and 23 deletions

View File

@ -1,13 +1,20 @@
{ dockerTools, buildEnv, nodejs, bun, pnpm }: { dockerTools, foodogsquaredLib, nodejs, bun, pnpm }:
dockerTools.buildImage { dockerTools.buildImage {
name = "js-backend"; name = "fds-js-backend";
copyToRoot = buildEnv { copyToRoot = foodogsquaredLib.buildFDSEnv {
name = "js-backend-root"; name = "fds-js-backend-root";
paths = [ nodejs bun pnpm ]; paths = [ nodejs bun pnpm ];
pathsToLink = [ "/bin" "/share" "/etc" "/lib" ];
}; };
config.Cmd = [ "/bin/bash" ]; runAsRoot = ''
mkdir -p /data
'';
config = {
Cmd = [ "/bin/bash" ];
WorkingDir = "/data";
Volumes."/data" = { };
};
} }

View File

@ -1,23 +1,12 @@
{ dockerTools, buildEnv, rustc, cargo, rust-bindgen, rust-analyzer, nodejs, bash { dockerTools, foodogsquaredLib, rustc, cargo, rust-bindgen, rust-analyzer
, meson, ninja, pkg-config }: , nodejs }:
dockerTools.buildImage { dockerTools.buildImage {
name = "rust-backend"; name = "fds-rust-backend";
copyToRoot = buildEnv { copyToRoot = foodogsquaredLib.buildFDSEnv {
name = "rust-backend-root"; name = "fds-rust-backend-root";
paths = [ paths = [ cargo rust-bindgen rust-analyzer rustc nodejs ];
bash
cargo
rust-bindgen
rust-analyzer
rustc
nodejs
meson
ninja
pkg-config
];
pathsToLink = [ "/bin" "/etc" "/lib" "/share" ];
}; };
runAsRoot = '' runAsRoot = ''