MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dk_file

Function dk_file

src/pipeline/pass_docker.c:1412–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410}
1411
1412static void dk_file(dk_t *d, TSNode root) {
1413 for (uint32_t i = 0; i < ts_node_named_child_count(root); i++) {
1414 TSNode ins = ts_node_named_child(root, i);
1415 if (dk_type(ins, "arg_instruction")) {
1416 dk_arg(d, ins);
1417 } else if (dk_type(ins, "env_instruction")) {
1418 dk_env(d, ins);
1419 } else if (dk_type(ins, "from_instruction")) {
1420 dk_from(d, ins);
1421 } else if ((dk_type(ins, "copy_instruction") || dk_type(ins, "add_instruction")) &&
1422 d->stage >= 0) {
1423 dk_copy(d, ins);
1424 } else if (dk_type(ins, "workdir_instruction") && d->stage >= 0) {
1425 dk_workdir(d, ins);
1426 } else if (dk_type(ins, "run_instruction") && d->stage >= 0) {
1427 dk_run(d, ins);
1428 } else if (dk_type(ins, "entrypoint_instruction") && d->stage >= 0) {
1429 dk_entry(d, ins, &d->entry);
1430 } else if (dk_type(ins, "cmd_instruction") && d->stage >= 0) {
1431 dk_entry(d, ins, &d->cmd);
1432 }
1433 }
1434 dk_spawn(d);
1435 dk_envs(d);
1436 dk_image_set(d);
1437}
1438
1439static char *dk_read(const char *path, size_t *len) {
1440 FILE *f = cbm_fopen(path, "rb");

Callers 1

cbm_pipeline_pass_dockerFunction · 0.85

Calls 11

dk_typeFunction · 0.85
dk_argFunction · 0.85
dk_envFunction · 0.85
dk_fromFunction · 0.85
dk_workdirFunction · 0.85
dk_runFunction · 0.85
dk_entryFunction · 0.85
dk_spawnFunction · 0.85
dk_envsFunction · 0.85
dk_image_setFunction · 0.85
dk_copyFunction · 0.70

Tested by

no test coverage detected