-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.optim-test
More file actions
72 lines (57 loc) · 2.91 KB
/
Copy pathDockerfile.optim-test
File metadata and controls
72 lines (57 loc) · 2.91 KB
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
67
68
69
70
71
from ubuntu:18.04
MAINTAINER Tuhin Sharma "tuhinsharma121@gmail.com"
# --------------------------------------------------------------------------------------------------
# install ubuntu essentials
# --------------------------------------------------------------------------------------------------
RUN apt-get update --fix-missing && \
apt-get -y install build-essential && \
apt-get -y install apt-utils && \
apt-get -y install zlib1g-dev && \
apt-get -y install libssl-dev && \
apt-get -y install libbz2-dev && \
apt-get -y install liblzma-dev && \
apt-get -y install wget
# --------------------------------------------------------------------------------------------------
# install python 3.6.8
# --------------------------------------------------------------------------------------------------
RUN apt-get -y install libsqlite3-dev
RUN wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz && \
tar -xzf Python-3.6.8.tgz && \
cd Python-3.6.8 && \
./configure --enable-loadable-sqlite-extensions && \
make && \
make install
# --------------------------------------------------------------------------------------------------
# install postgres
# --------------------------------------------------------------------------------------------------
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
apt-get -y install postgresql postgresql-contrib --fix-missing
## --------------------------------------------------------------------------------------------------
## install python packages
## --------------------------------------------------------------------------------------------------
COPY ./requirements.txt /
RUN pip3 install --upgrade setuptools
RUN pip3 install -r /requirements.txt
# --------------------------------------------------------------------------------------------------
# copy src code and scripts into root dir /
# --------------------------------------------------------------------------------------------------
COPY ./optimization_platform /optimization_platform
COPY ./utils /utils
COPY ./config.py.template /config.py
COPY ./tests /tests
COPY ./rds_tables.sql /rds_tables.sql
# --------------------------------------------------------------------------------------------------
# set timezone for the container as Asia/Kolkata
# --------------------------------------------------------------------------------------------------
ENV TZ=Asia/Kolkata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# --------------------------------------------------------------------------------------------------
# write the tests
# --------------------------------------------------------------------------------------------------
ADD ./test_config/scripts/test_suites.sh /bin/test_suites.sh
RUN chmod +x /bin/test_suites.sh
RUN chown postgres:postgres /
USER postgres
WORKDIR "/"
ENTRYPOINT ["/bin/test_suites.sh"]