forked from lamprosm/RADAR-Schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (50 loc) · 2.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM gradle:7.3-jdk17 as builder
RUN mkdir -p /code/java-sdk
WORKDIR /code/java-sdk
ENV GRADLE_USER_HOME=/code/.gradlecache \
GRADLE_OPTS=-Djdk.lang.Process.launchMechanism=vfork
COPY java-sdk/build.gradle java-sdk/settings.gradle /code/java-sdk/
COPY java-sdk/radar-schemas-commons/build.gradle /code/java-sdk/radar-schemas-commons/
COPY java-sdk/radar-schemas-core/build.gradle /code/java-sdk/radar-schemas-core/
COPY java-sdk/radar-schemas-registration/build.gradle /code/java-sdk/radar-schemas-registration/
COPY java-sdk/radar-schemas-tools/build.gradle /code/java-sdk/radar-schemas-tools/
COPY java-sdk/radar-catalog-server/build.gradle /code/java-sdk/radar-catalog-server/
RUN gradle downloadDependencies copyDependencies startScripts --no-watch-fs -Pprofile=docker
COPY commons /code/commons
COPY specifications /code/specifications
COPY java-sdk/radar-schemas-commons/src /code/java-sdk/radar-schemas-commons/src
COPY java-sdk/radar-schemas-core/src /code/java-sdk/radar-schemas-core/src
COPY java-sdk/radar-schemas-registration/src /code/java-sdk/radar-schemas-registration/src
COPY java-sdk/radar-schemas-tools/src /code/java-sdk/radar-schemas-tools/src
COPY java-sdk/radar-catalog-server/src /code/java-sdk/radar-catalog-server/src
RUN gradle jar --no-watch-fs -Pprofile=docker
FROM azul/zulu-openjdk-alpine:17-jre-headless
ENV KAFKA_SCHEMA_REGISTRY=http://schema-registry-1:8081 \
SCHEMA_REGISTRY_API_KEY="" \
SCHEMA_REGISTRY_API_SECRET="" \
KAFKA_NUM_PARTITIONS=3 \
KAFKA_NUM_REPLICATION=3 \
KAFKA_NUM_BROKERS=3 \
KAFKA_BOOTSTRAP_SERVERS="" \
KAFKA_CONFIG_PATH="" \
NO_VALIDATE=""
RUN apk add --no-cache \
bash \
curl \
rsync
WORKDIR /schema
RUN mkdir -p original merged java/src java/classes /usr/share/java \
&& chown 101 merged java/src java/classes
COPY --from=builder /code/java-sdk/radar-*/build/third-party/* /usr/lib/
COPY --from=builder /code/java-sdk/radar-*/build/scripts/* /usr/bin/
COPY --from=builder /code/java-sdk/radar-*/build/libs/* /usr/lib/
COPY ./commons ./original/commons
COPY ./specifications ./original/specifications
VOLUME /schema/conf
VOLUME /etc/confluent/
# Copy bash file
COPY docker/specifications.exclude /etc/radar-schemas/specifications.exclude
COPY docker/topic_init.sh ./docker/init.sh ./docker/list_aggregated.sh ./docker/list_raw.sh /usr/bin/
USER 101
ENTRYPOINT ["init.sh"]
CMD ["radar-schemas-tools", "-h"]