-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
86 lines (76 loc) · 2.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM ubuntu:22.04
LABEL author=devteam@level12.io
RUN apt-get clean \
&& apt-get update \
&& apt-get install -y software-properties-common locales \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
# map to the source code of the app
VOLUME /opt/src
# map to the CI artificates directory
VOLUME /opt/src/.ci/artifacts
# map to the CI test reports directory
VOLUME /opt/src/.ci/test-reports
RUN apt install gnupg -y \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update -q \
&& apt-get install -y curl gcc git libffi-dev libreadline-dev \
python3.9 python3.9-dev libpython3.9 libpython3.9-dev python3.9-venv python3.9-distutils\
python3.10 python3.10-dev libpython3.10 libpython3.10-dev python3.10-venv python3.10-distutils \
python3.11 python3.11-dev libpython3.11 libpython3.11-dev python3.11-venv python3.11-distutils \
python3.12 python3.12-dev libpython3.12 libpython3.12-dev python3.12-venv python3.12-distutils \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fSL "https://bootstrap.pypa.io/get-pip.py" -o get-pip.py \
&& python3.9 get-pip.py \
&& python3.10 get-pip.py \
&& python3.11 get-pip.py \
&& python3.12 get-pip.py \
&& rm get-pip.py
# need these libraries for lxml, PyQuery, and dbus for Keyring
# sasl, ldap, ssl for LDAP
RUN apt-get update -q && apt-get install -y \
libfreetype6 \
libjpeg-turbo8 \
libpq5 \
libxml2 \
libxslt1.1 \
libxslt1-dev \
libcairo2 \
libpango1.0 \
libtiff5 \
libgdk-pixbuf2.0-0 \
libdbus-glib-1-dev \
libsasl2-dev \
python3-dev \
libldap2-dev \
libssl-dev \
make \
&& rm -rf /var/lib/apt/lists/*
# install Microsoft ODBC driver for pyodbc
RUN apt-get update -q \
&& apt-get install -y apt-transport-https ca-certificates \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -q \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 \
&& rm -rf /var/lib/apt/lists/*
# install postgres client for migration testing
RUN apt-get update && apt-get install -y \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main" >> /etc/apt/sources.list.d/pgdg.list \
&& curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update \
&& apt-get install -y postgresql-client-11 postgresql-client-12 postgresql-client-13 postgresql-client-14 \
&& rm -rf /var/lib/apt/lists/*
# install additional packages for build setup and troubleshooting
RUN apt-get update && apt-get install -y \
iputils-ping \
netcat \
fio \
tree \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/src
CMD ["/opt/src/docker-entry"]
ENTRYPOINT ["/bin/bash"]