forked from RADAR-base/RADAR-Schemas
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
70 lines (55 loc) · 2.82 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
66
67
68
69
70
FROM gradle:7.0-jdk11 as builder
RUN mkdir -p /code/java-sdk
WORKDIR /code/java-sdk
ENV GRADLE_USER_HOME=/code/.gradlecache
COPY java-sdk/gradle/*.gradle /code/java-sdk/gradle/
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 --no-watch-fs
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 distTar --no-watch-fs \
&& cd radar-schemas-tools/build/distributions \
&& tar xzf radar-schemas-tools*.tar.gz \
&& cd ../../../radar-catalog-server/build/distributions \
&& tar xzf radar-catalog-server*.tar.gz
FROM openjdk:11-jre-slim
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 apt-get update && apt-get install -y --no-install-recommends \
curl \
rsync \
&& rm -rf /var/lib/apt/lists/*
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-schemas-tools/build/distributions/radar-schemas-tools-*/lib/* /usr/lib/
COPY --from=builder /code/java-sdk/radar-catalog-server/build/distributions/radar-catalog-server-*/lib/* /usr/lib/
COPY --from=builder /code/java-sdk/radar-schemas-tools/build/distributions/radar-schemas-tools-*/bin/radar-schemas-tools /usr/bin/
COPY --from=builder /code/java-sdk/radar-catalog-server/build/distributions/radar-catalog-server-*/bin/radar-catalog-server /usr/bin/
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"]