-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
36 lines (27 loc) · 1006 Bytes
/
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
FROM debian:stretch
MAINTAINER jobar <[email protected]>
# Needed to prevent apt errors with debian image
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# apt-get install -y apt-utils
ENV NODE_VERSION "8.x"
# Install needed packages:
# NOTE: librdkafka 0.11 is built and tested against libssl1.0. 1.1 causes a segfault.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential curl g++ net-tools libsasl2-dev libssl1.0-dev libcrypto++-dev
# Install node
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - && \
apt-get install -y nodejs
# Copy KafkaSSE code to /src/KafkaSSE
RUN mkdir -p /src/KafkaSSE
WORKDIR /src/KafkaSSE
COPY lib ./lib
COPY test ./test
COPY .travis.yml ./.travis.yml
COPY *.* ./
# Install KafkaSSE dependencies
RUN npm install
# Use this broker address for tests in docker.
ENV KAFKA_BROKERS='kafka:9092'
# Exec command: run test coverage
CMD ["npm", "run", "coverage"]