forked from zillow/ctds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (50 loc) · 1.4 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
ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION}
ARG FREETDS_VERSION=1.1.20
# Build FreeTDS (required by ctds)
RUN set -ex \
&& wget -O freetds.tar.gz "https://www.freetds.org/files/stable/freetds-${FREETDS_VERSION}.tar.gz" \
&& mkdir -p /usr/src/freetds \
&& tar -xzC /usr/src/freetds --strip-components=1 -f freetds.tar.gz \
&& rm freetds.tar.gz \
&& cd /usr/src/freetds \
&& ./configure \
--disable-odbc \
--disable-apps \
--disable-server \
--disable-pool \
--datarootdir=/usr/src/freetds/data \
--prefix=/usr \
&& make -j "$(nproc)" \
&& make install \
&& rm -rf \
/usr/src/freetds
# Python 3.3 support requires specific versions.
RUN set -ex \
&& case "${PYTHON_VERSION}" in 3.3*) \
pip --disable-pip-version-check \
--no-cache-dir \
install \
--no-deps \
isort==4.2.5 \
sphinx==1.4.9; \
esac
RUN set -ex \
&& pip --disable-pip-version-check \
--no-cache-dir \
install \
--upgrade \
pip \
&& pip --no-cache-dir \
install \
check-manifest \
coverage \
docutils \
pylint \
recommonmark \
sphinx \
sphinx_rtd_theme \
twine
COPY . /usr/src/ctds/
WORKDIR /usr/src/ctds
CMD ["/bin/bash"]