-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
63 lines (49 loc) · 1.41 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
# Dockerfile for QInteractiveBrokers
#
# To build:
# docker build --build-arg KDB_URL=https://kx.com/<YOUR KEY>/<VERSION>/linuxx86.zip -t qib/qib .
#
# To run:
# docker run -ti qib/qib
FROM ubuntu:16.04
MAINTAINER Morten Sorensen <https://github.com/mortensorensen/QInteractiveBrokers>
ENV QHOME=/opt/q \
QPATH=/opt/q \
QIB=/qib
RUN mkdir -p $QIB \
&& apt-get update && apt-get install -y \
wget \
unzip \
vim \
# For running 32-bit on 64-bit system
build-essential \
gcc-multilib \
g++-multilib \
# For CMake
software-properties-common \
&& add-apt-repository ppa:george-edison55/cmake-3.x \
&& apt-get install -y cmake \
&& rm -rf /var/lib/apt/lists/*
# Add QIB to installation
COPY . $QIB/
ARG KDB_URL
# Install kdb+
RUN wget -P /tmp ${KDB_URL} \
&& unzip /tmp/$(basename ${KDB_URL}) -d $(dirname $QHOME) \
&& ln -s $QHOME/l32/q /usr/bin/q \
&& rm /tmp/*
WORKDIR $QHOME
# Install qutil and qspec
RUN wget -O qutil.zip https://github.com/nugend/qutil/archive/master.zip \
&& wget -O qspec.zip https://github.com/nugend/qspec/archive/master.zip \
&& unzip '*.zip' \
&& mkdir qpackages \
&& mv qutil-master qpackages/qutil \
&& mv qspec-master qpackages/qspec \
&& rm *.zip \
&& ln -s $QHOME/qpackages/qutil/lib/bootstrap.q bootstrap.q \
&& ln -s $QHOME/qpackages/qutil/lib qutil \
&& ln -s $QHOME/qpackages/qspec/lib qspec \
&& cp -f qpackages/qutil/q_q.sample q.q
WORKDIR $QIB
CMD ["bash"]