Skip to content

Commit 7f68159

Browse files
committed
Test build
1 parent d24058e commit 7f68159

File tree

4 files changed

+3
-167
lines changed

4 files changed

+3
-167
lines changed

docker/pulsar-all/Dockerfile

+1-12
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,4 @@
1818
#
1919

2020
ARG PULSAR_IMAGE
21-
FROM busybox as pulsar-all
22-
23-
ARG PULSAR_IO_DIR
24-
ARG PULSAR_OFFLOADER_TARBALL
25-
26-
ADD ${PULSAR_IO_DIR} /connectors
27-
ADD ${PULSAR_OFFLOADER_TARBALL} /
28-
RUN mv /apache-pulsar-offloaders-*/offloaders /offloaders
29-
30-
FROM $PULSAR_IMAGE
31-
COPY --from=pulsar-all /connectors /pulsar/connectors
32-
COPY --from=pulsar-all /offloaders /pulsar/offloaders
21+
FROM $PULSAR_IMAGE

docker/pulsar-all/pom.xml

-68
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,11 @@
3131
<packaging>pom</packaging>
3232

3333
<dependencies>
34-
<dependency>
35-
<groupId>${project.groupId}</groupId>
36-
<artifactId>pulsar-io-distribution</artifactId>
37-
<version>${project.parent.version}</version>
38-
<type>pom</type>
39-
<scope>provided</scope>
40-
<exclusions>
41-
<exclusion>
42-
<groupId>*</groupId>
43-
<artifactId>*</artifactId>
44-
</exclusion>
45-
</exclusions>
46-
</dependency>
4734
<dependency>
4835
<groupId>io.perfmark</groupId>
4936
<artifactId>perfmark-api</artifactId>
5037
<scope>runtime</scope>
5138
</dependency>
52-
<dependency>
53-
<groupId>${project.groupId}</groupId>
54-
<artifactId>pulsar-offloader-distribution</artifactId>
55-
<version>${project.parent.version}</version>
56-
<classifier>bin</classifier>
57-
<type>tar.gz</type>
58-
<scope>provided</scope>
59-
<exclusions>
60-
<exclusion>
61-
<groupId>*</groupId>
62-
<artifactId>*</artifactId>
63-
</exclusion>
64-
</exclusions>
65-
</dependency>
6639
</dependencies>
6740

6841
<profiles>
@@ -97,45 +70,6 @@
9770
</dependencies>
9871
<build>
9972
<plugins>
100-
<plugin>
101-
<artifactId>maven-resources-plugin</artifactId>
102-
<executions>
103-
<execution>
104-
<id>copy-resources</id>
105-
<phase>generate-resources</phase>
106-
<goals>
107-
<goal>copy-resources</goal>
108-
</goals>
109-
<configuration>
110-
<outputDirectory>${basedir}/target/apache-pulsar-io-connectors-${project.version}-bin</outputDirectory>
111-
<resources>
112-
<resource>
113-
<directory>${basedir}/../../distribution/io/target/apache-pulsar-io-connectors-${project.version}-bin</directory>
114-
<filtering>false</filtering>
115-
</resource>
116-
</resources>
117-
</configuration>
118-
</execution>
119-
</executions>
120-
</plugin>
121-
<plugin>
122-
<groupId>org.apache.maven.plugins</groupId>
123-
<artifactId>maven-dependency-plugin</artifactId>
124-
<executions>
125-
<execution>
126-
<id>copy-offloader-tarball</id>
127-
<goals>
128-
<goal>copy-dependencies</goal>
129-
</goals>
130-
<phase>generate-resources</phase>
131-
<configuration>
132-
<outputDirectory>${project.build.directory}/</outputDirectory>
133-
<includeArtifactIds>pulsar-offloader-distribution</includeArtifactIds>
134-
<excludeTransitive>true</excludeTransitive>
135-
</configuration>
136-
</execution>
137-
</executions>
138-
</plugin>
13973
<plugin>
14074
<groupId>io.fabric8</groupId>
14175
<artifactId>docker-maven-plugin</artifactId>
@@ -158,8 +92,6 @@
15892
<tag>${project.version}-${git.commit.id.abbrev}</tag>
15993
</tags>
16094
<args>
161-
<PULSAR_IO_DIR>target/apache-pulsar-io-connectors-${project.version}-bin</PULSAR_IO_DIR>
162-
<PULSAR_OFFLOADER_TARBALL>target/pulsar-offloader-distribution-${project.version}-bin.tar.gz</PULSAR_OFFLOADER_TARBALL>
16395
<PULSAR_IMAGE>${docker.organization}/pulsar:${project.version}-${git.commit.id.abbrev}</PULSAR_IMAGE>
16496
</args>
16597
<buildx>

docker/pulsar/Dockerfile

+1-87
Original file line numberDiff line numberDiff line change
@@ -18,90 +18,4 @@
1818
#
1919

2020
# First create a stage with just the Pulsar tarball and scripts
21-
FROM busybox as pulsar
22-
23-
ARG PULSAR_TARBALL
24-
25-
ADD ${PULSAR_TARBALL} /
26-
RUN mv /apache-pulsar-* /pulsar
27-
RUN rm -rf /pulsar/bin/*.cmd
28-
29-
COPY scripts/apply-config-from-env.py /pulsar/bin
30-
COPY scripts/apply-config-from-env-with-prefix.py /pulsar/bin
31-
COPY scripts/gen-yml-from-env.py /pulsar/bin
32-
COPY scripts/generate-zookeeper-config.sh /pulsar/bin
33-
COPY scripts/pulsar-zookeeper-ruok.sh /pulsar/bin
34-
COPY scripts/watch-znode.py /pulsar/bin
35-
COPY scripts/install-pulsar-client.sh /pulsar/bin
36-
37-
# The final image needs to give the root group sufficient permission for Pulsar components
38-
# to write to specific directories within /pulsar
39-
# The file permissions are preserved when copying files from this builder image to the target image.
40-
RUN for SUBDIRECTORY in conf data download logs; do \
41-
[ -d /pulsar/$SUBDIRECTORY ] || mkdir /pulsar/$SUBDIRECTORY; \
42-
chmod -R g+w /pulsar/$SUBDIRECTORY; \
43-
done
44-
45-
# Trino writes logs to this directory (at least during tests), so we need to give the process permission
46-
# to create those log directories. This should be removed when Trino is removed.
47-
RUN chmod g+w /pulsar/trino
48-
49-
### Create 2nd stage from Ubuntu image
50-
### and add OpenJDK and Python dependencies (for Pulsar functions)
51-
52-
FROM ubuntu:22.04
53-
54-
ARG DEBIAN_FRONTEND=noninteractive
55-
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
56-
ARG UBUNTU_SECURITY_MIRROR=http://security.ubuntu.com/ubuntu/
57-
58-
# Install some utilities
59-
RUN sed -i -e "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirrors.ubuntu.com/mirrors.txt}|g" \
60-
-e "s|http://security\.ubuntu\.com/ubuntu/|${UBUNTU_SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu/}|g" /etc/apt/sources.list \
61-
&& echo 'Acquire::http::Timeout "30";\nAcquire::ftp::Timeout "30";\nAcquire::Retries "3";' > /etc/apt/apt.conf.d/99timeout_and_retries \
62-
&& apt-get update \
63-
&& apt-get -y dist-upgrade \
64-
&& apt-get -y install --no-install-recommends netcat dnsutils less procps iputils-ping \
65-
python3 python3-kazoo python3-pip \
66-
curl ca-certificates wget apt-transport-https
67-
68-
# Install Eclipse Temurin Package
69-
RUN mkdir -p /etc/apt/keyrings \
70-
&& wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc \
71-
&& echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list \
72-
&& apt-get update \
73-
&& apt-get -y dist-upgrade \
74-
&& apt-get -y install temurin-17-jdk \
75-
&& export ARCH=$(uname -m | sed -r 's/aarch64/arm64/g' | awk '!/arm64/{$0="amd64"}1') \
76-
&& echo networkaddress.cache.ttl=1 >> /usr/lib/jvm/temurin-17-jdk-$ARCH/conf/security/java.security \
77-
78-
# Cleanup apt
79-
RUN apt-get -y --purge autoremove \
80-
&& apt-get autoclean \
81-
&& apt-get clean \
82-
&& rm -rf /var/lib/apt/lists/*
83-
84-
RUN pip3 install pyyaml==5.4.1
85-
86-
# Pulsar currently writes to the below directories, assuming the default configuration.
87-
# Note that number 4 is the reason that pulsar components need write access to the /pulsar directory.
88-
# 1. /pulsar/data - both bookkeepers and zookeepers use this directory
89-
# 2. /pulsar/logs - function workers write to this directory and pulsar-admin initializes this directory
90-
# 3. /pulsar/download - functions write to this directory
91-
# 4. /pulsar - hadoop writes to this directory
92-
RUN mkdir /pulsar && chmod g+w /pulsar
93-
94-
ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE
95-
96-
COPY --from=pulsar /pulsar /pulsar
97-
WORKDIR /pulsar
98-
99-
ARG PULSAR_CLIENT_PYTHON_VERSION
100-
ENV PULSAR_CLIENT_PYTHON_VERSION ${PULSAR_CLIENT_PYTHON_VERSION}
101-
102-
# This script is intentionally run as the root user to make the dependencies available for all UIDs.
103-
RUN chmod +x /pulsar/bin/install-pulsar-client.sh
104-
RUN /pulsar/bin/install-pulsar-client.sh
105-
106-
# The UID must be non-zero. Otherwise, it is arbitrary. No logic should rely on its specific value.
107-
USER 10000
21+
FROM ubuntu:22.04

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ flexible messaging model and an intuitive client API.</description>
125125
<testHeapDumpPath>/tmp</testHeapDumpPath>
126126
<surefire.shutdown>kill</surefire.shutdown>
127127
<docker.organization>apachepulsar</docker.organization>
128+
128129
<skipSourceReleaseAssembly>false</skipSourceReleaseAssembly>
129130
<skipBuildDistribution>false</skipBuildDistribution>
130131
<shadePluginPhase>package</shadePluginPhase>

0 commit comments

Comments
 (0)