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 {
name = "js-backend";
name = "fds-js-backend";
copyToRoot = buildEnv {
name = "js-backend-root";
copyToRoot = foodogsquaredLib.buildFDSEnv {
name = "fds-js-backend-root";
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
, meson, ninja, pkg-config }:
{ dockerTools, foodogsquaredLib, rustc, cargo, rust-bindgen, rust-analyzer
, nodejs }:
dockerTools.buildImage {
name = "rust-backend";
name = "fds-rust-backend";
copyToRoot = buildEnv {
name = "rust-backend-root";
paths = [
bash
cargo
rust-bindgen
rust-analyzer
rustc
nodejs
meson
ninja
pkg-config
];
pathsToLink = [ "/bin" "/etc" "/lib" "/share" ];
copyToRoot = foodogsquaredLib.buildFDSEnv {
name = "fds-rust-backend-root";
paths = [ cargo rust-bindgen rust-analyzer rustc nodejs ];
};
runAsRoot = ''