Skip to content

Commit

Permalink
Restore the Quarkus Micro Base Image name
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Apr 19, 2023
1 parent 6343430 commit aef3dc9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
push:
branches:
- main
paths-ignore:
- '.build/**'

Expand Down
3 changes: 2 additions & 1 deletion quarkus-micro-base-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<argument>--dockerfile-dir=${pom.basedir}/target/docker</argument>
<argument>--ubi-minimal=${ubi-min.base}</argument>
<argument>--ubi-micro=${ubi-micro.base}</argument>
<argument>--out=quay.io/quarkus/${ubi.tag}-quarkus-micro-image:2.0</argument>
<argument>--ubi-tag=${ubi.tag}</argument>
<argument>--out=quay.io/quarkus/quarkus-micro-image:2.0</argument>
<argument>--dry-run=${jdock.dry-run}</argument>
</args>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class Build implements Callable<Integer> {
@CommandLine.Option(names = { "--ubi-micro" }, description = "The UBI Micro base image")
private String micro;

@CommandLine.Option(names = { "--ubi-tag" }, description = "The tag to add to the output image tag")
private String ubiTag;

@CommandLine.Option(names = { "--out" }, description = "The output image")
private String output;

Expand All @@ -31,7 +34,7 @@ public class Build implements Callable<Integer> {
@Override
public Integer call() throws Exception {
JDock.setDockerFileDir(dockerFileDir);
QuarkusMicro.define(minimal, micro, output)
QuarkusMicro.define(minimal, micro, output, ubiTag)
.buildLocalImages(dryRun);

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class Push implements Callable<Integer> {
@CommandLine.Option(names = { "--ubi-micro" }, description = "The UBI Micro base image")
private String micro;

@CommandLine.Option(names = { "--ubi-tag" }, description = "The tag to add to the output image tag")
private String ubiTag;

@CommandLine.Option(names = { "--out" }, description = "The output image")
private String output;

Expand All @@ -31,7 +34,7 @@ public class Push implements Callable<Integer> {
@Override
public Integer call() throws Exception {
JDock.setDockerFileDir(dockerFileDir);
QuarkusMicro.define(minimal, micro, output)
QuarkusMicro.define(minimal, micro, output, ubiTag)
.buildAndPush();
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

public class QuarkusMicro {

static MultiArchImage define(String minimal, String micro, String output) {
static MultiArchImage define(String minimal, String micro, String output, String ubiTag) {
MultiStageDockerFile img = Dockerfile.multistages()
.stage("ubi", Dockerfile.from(minimal))
.stage("scratch", Dockerfile.from(micro))
.stage(Dockerfile.from("scratch")
.copyFromStage("ubi", "/usr/lib64/libgcc_s.so.1")
.copyFromStage("ubi", "/usr/lib64/libstdc++.so.6")
.copyFromStage("ubi", "/usr/lib64/libz.so.1"));
if (!"ubi".equals(ubiTag)) {
output = output + '-' + ubiTag;
}
return new MultiArchImage(output, Map.of(
"arm64", img,
"amd64", img));
Expand Down

0 comments on commit aef3dc9

Please sign in to comment.