-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use compiled cmak for docker build
* consider renamed github repository * use compiled version * use slim base image * single place for keeping CMAK version Resolves #27 Resolves #24 Resolves #22 Resolves #11
- Loading branch information
1 parent
20f68fd
commit 7e7a22e
Showing
3 changed files
with
15 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
FROM openjdk:11-jre as build | ||
|
||
### STAGE 1: Build ### | ||
FROM openjdk:11-jdk AS build | ||
ARG CMAK_VERSION="3.0.0.5" | ||
|
||
ENV KAFKA_MANAGER_SOURCE=3.0.0.5 | ||
ENV KAFKA_MANAGER_VERSION=3.0.0.5 | ||
ENV KAFKA_MANAGER_SRC_DIR=/kafka-manager-source | ||
ENV KAFKA_MANAGER_DIST_FILE=$KAFKA_MANAGER_SRC_DIR/target/universal/cmak-$KAFKA_MANAGER_VERSION.zip | ||
RUN curl -L https://github.com/yahoo/CMAK/releases/download/${CMAK_VERSION}/cmak-${CMAK_VERSION}.zip -o /tmp/cmak.zip \ | ||
&& unzip /tmp/cmak.zip -d / \ | ||
&& ln -s /cmak-$CMAK_VERSION /cmak \ | ||
&& rm -rf /tmp/cmak.zip | ||
|
||
RUN echo "Building Kafka Manager" \ | ||
&& wget "https://github.com/yahoo/CMAK/archive/${KAFKA_MANAGER_SOURCE}.tar.gz" -O CMAK-sources.tar.gz \ | ||
&& mkdir $KAFKA_MANAGER_SRC_DIR \ | ||
&& tar -xzf CMAK-sources.tar.gz -C $KAFKA_MANAGER_SRC_DIR --strip-components=1 \ | ||
&& cd $KAFKA_MANAGER_SRC_DIR \ | ||
&& echo 'scalacOptions ++= Seq("-Xmax-classfile-name", "200")' >> build.sbt | ||
|
||
ADD robust_build.sh / | ||
RUN chmod +x robust_build.sh && /robust_build.sh | ||
|
||
### STAGE 2: Package ### | ||
FROM openjdk:11-jre | ||
FROM openjdk:11-jre-slim | ||
MAINTAINER Hleb Albau <[email protected]> | ||
|
||
###RUN apk update && apk add bash | ||
COPY --from=build /kafka-manager-bin /kafka-manager | ||
COPY --from=build /cmak /cmak | ||
|
||
VOLUME /cmak/conf | ||
|
||
VOLUME /kafka-manager/conf | ||
ENV JAVA_OPTS=-XX:MaxRAMPercentage=80 | ||
##CMD ["/kafka-manager/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/kafka-manager"] | ||
ENTRYPOINT ["/kafka-manager/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/kafka-manager", ""] | ||
|
||
WORKDIR /cmak | ||
|
||
ENTRYPOINT ["/cmak/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/cmak", ""] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.