-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add arm64 Docker images #14005
Add arm64 Docker images #14005
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,14 +69,6 @@ | |
<profile> | ||
<id>docker</id> | ||
<!-- include the docker image only when docker profile is active --> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>pulsar-docker-image</artifactId> | ||
<version>${project.version}</version> | ||
<classifier>docker-info</classifier> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
|
@@ -119,57 +111,73 @@ | |
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.spotify</groupId> | ||
<artifactId>dockerfile-maven-plugin</artifactId> | ||
<version>${dockerfile-maven.version}</version> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>${exec-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>default</id> | ||
<id>docker-build</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>add-no-repo-and-version</id> | ||
<goals> | ||
<goal>tag</goal> | ||
</goals> | ||
<configuration> | ||
<repository>pulsar-all</repository> | ||
<tag>${project.version}</tag> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>add-no-repo-and-latest</id> | ||
<goals> | ||
<goal>tag</goal> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<repository>pulsar-all</repository> | ||
<tag>latest</tag> | ||
<environmentVariables> | ||
<DOCKER_BUILDKIT>1</DOCKER_BUILDKIT> | ||
</environmentVariables> | ||
<executable>docker</executable> | ||
<workingDirectory>${project.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>build</argument> | ||
<argument>--no-cache</argument> | ||
<argument>--build-arg</argument> | ||
<argument>PULSAR_TARBALL=target/pulsar-server-distribution-${project.version}-bin.tar.gz</argument> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to pass |
||
<argument>-t</argument> | ||
<argument>pulsar-all:${project.version}</argument> | ||
<argument>-t</argument> | ||
<argument>pulsar-all:latest</argument> | ||
<argument>-t</argument> | ||
<argument>${docker.organization}/pulsar-all:${project.version}</argument> | ||
<argument>-t</argument> | ||
<argument>${docker.organization}/pulsar-all:latest</argument> | ||
<argument>.</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>tag-and-push-latest</id> | ||
<id>docker-push</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>tag</goal> | ||
<goal>push</goal> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<repository>${docker.organization}/pulsar-all</repository> | ||
<tag>latest</tag> | ||
<environmentVariables> | ||
<DOCKER_BUILDKIT>1</DOCKER_BUILDKIT> | ||
</environmentVariables> | ||
<executable>docker</executable> | ||
<workingDirectory>${project.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>buildx</argument> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
<argument>build</argument> | ||
<argument>--no-cache</argument> | ||
<argument>--platform=linux/amd64,linux/arm64</argument> | ||
<argument>--build-arg</argument> | ||
<argument> | ||
PULSAR_IO_DIR=target/apache-pulsar-io-connectors-${project.version}-bin | ||
</argument> | ||
<argument> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to add |
||
PULSAR_OFFLOADER_TARBALL=target/pulsar-offloader-distribution-${project.version}-bin.tar.gz | ||
</argument> | ||
<argument>--push</argument> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this |
||
<argument>-t</argument> | ||
<argument>${docker.organization}/pulsar-all:${project.version}</argument> | ||
<argument>-t</argument> | ||
<argument>${docker.organization}/pulsar-all:latest</argument> | ||
<argument>.</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<repository>${docker.organization}/pulsar-all</repository> | ||
<pullNewerImage>false</pullNewerImage> | ||
<tag>${project.version}</tag> | ||
<buildArgs> | ||
<PULSAR_IO_DIR>target/apache-pulsar-io-connectors-${project.version}-bin</PULSAR_IO_DIR> | ||
<PULSAR_OFFLOADER_TARBALL>target/pulsar-offloader-distribution-${project.version}-bin.tar.gz</PULSAR_OFFLOADER_TARBALL> | ||
</buildArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may need to keep this dependency in order to keep the build order,
pulsar-docker-image -> pulsar-all-docker-image
, since thepulsar-all-docker-image
copies the pulsar server binaries from thepulsar-docker-image
(newly built) and additionally inject the updated puslar-offloader and pulsar-io binaries.