-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
66 lines (58 loc) · 2.27 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
# apigateway-zmq-adaptor
#
# VERSION 0.1.0
#
# From https://hub.docker.com/_/alpine/
#
FROM alpine:latest
ENV ZMQ_VERSION 4.0.5
ENV CZMQ_VERSION 2.2.0
ENV ZMQ_ADAPTOR_VERSION 0.1.1
RUN apk update \
&& apk add \
gcc tar libtool zlib make musl-dev openssl-dev g++ zlib-dev curl
RUN echo " ... adding ZMQ and CZMQ" \
&& curl -L https://s3.amazonaws.com/adobe-cloudops-apip-installers-ue1/3rd-party/zeromq-${ZMQ_VERSION}.tar.gz -o /tmp/zeromq.tar.gz \
&& cd /tmp/ \
&& tar -xf /tmp/zeromq.tar.gz \
&& cd /tmp/zeromq*/ \
&& ./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
&& make && make install \
&& curl -L https://s3.amazonaws.com/adobe-cloudops-apip-installers-ue1/3rd-party/czmq-${CZMQ_VERSION}.tar.gz -o /tmp/czmq.tar.gz \
&& cd /tmp/ \
&& tar -xf /tmp/czmq.tar.gz \
&& cd /tmp/czmq*/ \
&& ./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
&& make && make install \
&& rm -rf /tmp/zeromq* && rm -rf /tmp/czmq* \
&& rm -rf /var/cache/apk/*
RUN apk update \
&& apk add libgcc libstdc++
# --- DEV ---
RUN apk update \
&& apk add \
gcc tar libtool zlib make musl-dev openssl-dev g++ zlib-dev curl \
&& apk add check-dev
COPY src /tmp/api-gateway-zmq-adaptor-${ZMQ_ADAPTOR_VERSION}/src
COPY tests /tmp/api-gateway-zmq-adaptor-${ZMQ_ADAPTOR_VERSION}/tests
COPY Makefile /tmp/api-gateway-zmq-adaptor-${ZMQ_ADAPTOR_VERSION}/Makefile
RUN cd /tmp/api-gateway-zmq-adaptor-* \
&& make test \
&& mkdir -p /usr/local/sbin \
&& PREFIX=/usr/local/sbin make install \
&& rm -rf /tmp/api-gateway-zmq-adaptor-*
# ------------------
RUN apk del check-dev gcc tar libtool make musl-dev openssl-dev g++ zlib-dev curl \
&& rm -rf /var/cache/apk/*
COPY Docker-init.sh /etc/init-container.sh
ONBUILD COPY init.sh /etc/init-container.sh
# volume to expose IPC sockets
# http://api.zeromq.org/4-1:zmq-ipc
VOLUME /var/run/api-gateway-zmq-adaptor
ENTRYPOINT ["/etc/init-container.sh"]