Skip to content

Commit

Permalink
fix: python build should set WORKDIR for user instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-s committed Sep 20, 2024
1 parent c2008dd commit b270412
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ public K8sKanikoRunnable produce(Run run) {
".txt"
);

//set workdir from now on
dockerfileGenerator.workdir("/shared");

// Add user instructions
Optional
.ofNullable(taskSpec.getInstructions())
.ifPresent(instructions -> instructions.forEach(i -> dockerfileGenerator.run(i)));
.ifPresent(instructions -> instructions.forEach(dockerfileGenerator::run));

// If requirements.txt are defined add to build
if (functionSpec.getRequirements() != null && !functionSpec.getRequirements().isEmpty()) {
Expand Down

0 comments on commit b270412

Please sign in to comment.