-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathDockerfile.test
More file actions
37 lines (26 loc) · 1.14 KB
/
Dockerfile.test
File metadata and controls
37 lines (26 loc) · 1.14 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
FROM registry.access.redhat.com/ubi9/ubi-minimal
RUN curl -o /etc/yum.repos.d/postgresql.repo \
https://copr.fedorainfracloud.org/coprs/g/insights/postgresql-16/repo/epel-9/group_insights-postgresql-16-epel-9.repo
RUN microdnf install -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
python312 python3.12-pip python3.12-devel libpq-devel gcc git postgresql-server which findutils diffutils && \
microdnf clean all
# for testing.posgres python package to find postgres commands
RUN ln -s /usr/bin/initdb /usr/local/bin/initdb && \
ln -s /usr/bin/postgres /usr/local/bin/postgres
RUN mkdir /engine && \
chown -R postgres:postgres /engine
WORKDIR /engine
ADD requirements.txt /engine/
ADD requirements-dev.txt /engine/
ENV LC_ALL=C.utf8
ENV LANG=C.utf8
RUN pip3.12 install --upgrade pip && \
pip3.12 install -r requirements.txt -r requirements-dev.txt && \
pip3.12 cache purge && \
pip3.12 uninstall -y pip
ADD . /engine
RUN chown -R postgres:postgres /engine
USER postgres
# config git, required by "test_upgrade"
RUN git config --global user.email "test@test" && \
git config --global user.name "test"