-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_test_build
53 lines (38 loc) · 1.68 KB
/
Dockerfile_test_build
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
# the actual image
FROM ubuntu:16.04
WORKDIR /srv
# install all the system dependancies
RUN apt-get update && apt-get install -y python2.7 \
python-pip fping python-dev \
libpq-dev libffi-dev unixodbc unixodbc-dev \
freetds-bin freetds-dev tdsodbc strace htop \
inetutils-ping nmap traceroute netcat tcpdump \
net-tools bmon entr git pkg-config nano vim wget \
curl supervisor virtualenv autoconf libsnmp-dev \
libncurses5-dev g++ cmake libssl-dev libaio1 liblz4-1 libsqliteodbc
RUN apt-get install sqlite3
RUN mkdir /srv/staging
RUN wget -O /srv/staging/go1.13.linux-amd64.tar.gz https://dl.google.com/go/go1.13.linux-amd64.tar.gz
RUN tar zxvf /srv/staging/go1.13.linux-amd64.tar.gz -C /srv
RUN ln -s /srv/go/bin/go /usr/local/bin/go
RUN rm /srv/staging/go1.13.linux-amd64.tar.gz
RUN mkdir /workspace
WORKDIR /workspace
COPY requirements.txt /workspace/requirements.txt
COPY README.md /workspace/README.md
RUN pip install --upgrade 'setuptools<45.0.0'
RUN pip install -r requirements.txt
COPY . .
ENV TERM="xterm" GODEBUG="cgocheck=0"
# Install the sdist package
RUN python setup.py sdist && cd dist && tar zxvf *.tar.gz && cd go* && python setup.py install
RUN cp /workspace/_manual_test.sh /workspace/dist/
RUN cp /workspace/manual_test.py /workspace/dist/go*-python*/
# Some magic here - it's important so that python can find a shared object
# at runtime
ENV LD_LIBRARY_PATH=/usr/local/lib/gopy
RUN sqlite3 /workspace/testdb.sqlite < /workspace/create_test_db.sql
COPY odbcinst.ini /etc/odbcinst.ini
# Get out of the base workspace dir because it was causing strange
# python include issues due to overlapping folder names
WORKDIR /workspace/dist