File tree 3 files changed +45
-6
lines changed
3 files changed +45
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM registry.access.redhat.com/ubi8/openjdk-11
1
+ # Stage 1: Build stage
2
+ FROM registry.access.redhat.com/ubi8/openjdk-11 AS builder
2
3
3
4
LABEL maintainer="Debezium Community"
4
5
@@ -47,6 +48,18 @@ RUN echo "$SERVER_MD5 /tmp/debezium.tar.gz" | md5sum -c - &&\
47
48
#
48
49
RUN chmod -R g+w,o+w $SERVER_HOME
49
50
51
+ # Stage 2: Final image
52
+ FROM registry.access.redhat.com/ubi8/openjdk-11
53
+
54
+ ENV SERVER_HOME=/debezium
55
+
56
+ USER root
57
+ RUN microdnf clean all
58
+
59
+ USER jboss
60
+
61
+ COPY --from=builder $SERVER_HOME $SERVER_HOME
62
+
50
63
# Set the working directory to the Debezium Server home directory
51
64
WORKDIR $SERVER_HOME
52
65
Original file line number Diff line number Diff line change 1
- FROM registry.access.redhat.com/ubi8/openjdk-11
1
+ # Stage 1: Build stage
2
+ FROM registry.access.redhat.com/ubi8/openjdk-11 AS builder
2
3
3
4
LABEL maintainer="Debezium Community"
4
5
@@ -29,19 +30,31 @@ RUN mkdir $SERVER_HOME/conf && \
29
30
#
30
31
# Download and install Debezium Server
31
32
#
32
- COPY debezium-server-dist-2.2 .0-SNAPSHOT.tar.gz /tmp/debezium.tar.gz
33
+ COPY debezium-server-dist-2.6 .0-SNAPSHOT.tar.gz /tmp/debezium.tar.gz
33
34
34
35
#
35
36
# Verify the contents and then install ...
36
37
#
37
- RUN tar xzf /tmp/debezium.tar.gz -C $SERVER_HOME --strip-components 1
38
+ RUN tar xzf /tmp/debezium.tar.gz -C $SERVER_HOME --strip-components 1 &&\
39
+ rm -f /opt/debezium.tar.gz
38
40
39
41
#
40
42
# Allow random UID to use Debezium Server
41
43
#
42
44
RUN chmod -R g+w,o+w $SERVER_HOME
43
45
44
- # Set the working directory to the Debezium Server home directory
46
+ # Stage 2: Final image
47
+ FROM registry.access.redhat.com/ubi8/openjdk-11
48
+
49
+ ENV SERVER_HOME=/debezium
50
+
51
+ USER root
52
+ RUN microdnf clean all
53
+
54
+ USER jboss
55
+
56
+ COPY --from=builder $SERVER_HOME $SERVER_HOME
57
+
45
58
WORKDIR $SERVER_HOME
46
59
47
60
#
Original file line number Diff line number Diff line change 1
- FROM registry.access.redhat.com/ubi8/openjdk-11
1
+ # Stage 1: Build stage
2
+ FROM registry.access.redhat.com/ubi8/openjdk-11 AS builder
2
3
3
4
LABEL maintainer="Debezium Community"
4
5
@@ -47,6 +48,18 @@ RUN SNAPSHOT_VERSION=$(curl --silent -fSL $MAVEN_OSS_SNAPSHOT/io/debezium/debezi
47
48
#
48
49
RUN chmod -R g+w,o+w $SERVER_HOME
49
50
51
+ # Stage 2: Final image
52
+ FROM registry.access.redhat.com/ubi8/openjdk-11
53
+
54
+ ENV SERVER_HOME=/debezium
55
+
56
+ USER root
57
+ RUN microdnf clean all
58
+
59
+ USER jboss
60
+
61
+ COPY --from=builder $SERVER_HOME $SERVER_HOME
62
+
50
63
# Set the working directory to the Debezium Server home directory
51
64
WORKDIR $SERVER_HOME
52
65
You can’t perform that action at this time.
0 commit comments