forked from zendesk/maxwell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (15 loc) · 758 Bytes
/
Dockerfile
File metadata and controls
19 lines (15 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM maven:3.5-jdk-8
ENV MAXWELL_VERSION=1.11.0 KAFKA_VERSION=0.11.0.1
COPY . /workspace
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y build-essential \
&& cd /workspace \
&& KAFKA_VERSION=$KAFKA_VERSION make package MAXWELL_VERSION=$MAXWELL_VERSION \
&& mkdir /app \
&& mv /workspace/target/maxwell-$MAXWELL_VERSION/maxwell-$MAXWELL_VERSION/* /app/ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* /workspace/ \
&& echo "$MAXWELL_VERSION" > /REVISION
WORKDIR /app
CMD [ "/bin/bash", "-c", "bin/maxwell --user=$MYSQL_USERNAME --password=$MYSQL_PASSWORD --host=$MYSQL_HOST --producer=kafka --kafka.bootstrap.servers=$KAFKA_HOST:$KAFKA_PORT $MAXWELL_OPTIONS" ]