Skip to content

Commit

Permalink
Merge pull request #2335 from lf-lang/docker-source
Browse files Browse the repository at this point in the history
Fixed docker generation for images that use /bin/sh
  • Loading branch information
lhstrh authored Jun 28, 2024
2 parents 73e8c8a + 40c49e9 commit 4cb65ff
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected List<String> getBuildCommands() {
protected List<String> getPreBuildCommand() {
var script = context.getTargetConfig().get(DockerProperty.INSTANCE).preBuildScript();
if (!script.isEmpty()) {
return List.of("source src-gen/" + StringEscapeUtils.escapeXSI(script));
return List.of(". src-gen/" + StringEscapeUtils.escapeXSI(script));
}
return List.of();
}
Expand All @@ -97,7 +97,7 @@ protected List<String> getPreBuildCommand() {
protected List<String> getPostBuildCommand() {
var script = context.getTargetConfig().get(DockerProperty.INSTANCE).postBuildScript();
if (!script.isEmpty()) {
return List.of("source src-gen/" + StringEscapeUtils.escapeXSI(script));
return List.of(". src-gen/" + StringEscapeUtils.escapeXSI(script));
}
return List.of();
}
Expand Down Expand Up @@ -198,7 +198,7 @@ protected final List<String> getEntryPointCommands() {
return List.of(
DockerOptions.DEFAULT_SHELL,
"-c",
"source scripts/"
". scripts/"
+ StringEscapeUtils.escapeXSI(script)
+ " && "
+ entryPoint().stream().collect(Collectors.joining(" ")));
Expand Down

0 comments on commit 4cb65ff

Please sign in to comment.