-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.debian_bullseye
72 lines (56 loc) · 2.42 KB
/
Dockerfile.debian_bullseye
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
# Quick Help is right underneath.
FROM debian:bullseye
LABEL Description="Build environment"
ENV HOME=/root
ENV SOCI_DB_SQLITE3="sqlite3://db=sample.sqlite"
ENV SOCI_DB_MYSQL="mysql://db=testdb user=root"
ENV SOCI_DB_POSTGRESQL="postgresql://dbname=tester user=root"
ENV SOCI_DB_FIREBIRD="firebird://service=/dbname.fdb user=SYSDBA password=masterkey"
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get -qy --no-install-recommends install \
build-essential \
cmake \
gdb \
wget \
clang \
libc++-dev \
libc++abi-dev \
lld \
pip \
libmysql++-dev \
libpq-dev \
curl \
git \
nano \
locales-all
# Install Python's csvkit to be able to compare everything.
RUN pip3 install csvkit==1.5.0
# Deal with the MySQL server.
RUN apt-get install -y mariadb-server && sleep 1
RUN service mariadb start && mariadb -u root -e "CREATE DATABASE testdb" && service mariadb stop
# Deal with the PostgreSQL server.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -qy postgresql
RUN apt-get install sudo
RUN service postgresql start && sudo -u postgres createuser -s root; createdb tester && service postgresql stop
# Some filesystem fix.
RUN mkdir -p /nonexistent
# Deal with the Firebird in total.
RUN apt-get -qy --no-install-recommends install libtomcrypt1 libtommath1 libtomcrypt-dev libtommath-dev firebird3.0-common firebird3.0-utils
RUN curl -L -o Firebird-5.0.0.1306-0-linux-x64.tar.gz -L https://github.com/FirebirdSQL/firebird/releases/download/v5.0.0/Firebird-5.0.0.1306-0-linux-x64.tar.gz
RUN tar -xzvf Firebird-5.0.0.1306-0-linux-x64.tar.gz && rm -f Firebird-5.0.0.1306-0-linux-x64.tar.gz
RUN cd Firebird-5.0.0.1306-0-linux-x64 && y masterkey | ./install.sh && \
echo "CREATE DATABASE '/dbname.fdb' PAGE_SIZE 4096 USER 'sysdba' PASSWORD 'masterkey' ;" | isql-fb -q
# Finalize.
ENTRYPOINT service postgresql start && service mariadb start && service firebird start && bash
# QUICK HELP
# Go to the csvsuite directory, then:
# docker build -t foo/csvsuite_debian_bullseye -f Dockerfile.debian_bullseye .
# Check your new docker image is in the system:
# docker images
# Run the container from your image:
# docker run -it --rm --name=csvsuite_debian_bullseye --mount type=bind,source=${PWD},target=/src foo/csvsuite_debian_bullseye
# Inside the docker container build all:
# cd src && mkdir build && cd build && cmake .. && make -j 4 all
# And run tests:
# cd suite/test && ctest && cd ../../