forked from RedHatInsights/vulnerability-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
34 lines (24 loc) · 904 Bytes
/
Dockerfile.test
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
FROM fedora:28
RUN dnf install -y python3 python3-pip git postgresql-server which findutils && \
pip3 install --upgrade pip pipenv
# 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
USER postgres
ADD /tests/Pipfile* /engine/
WORKDIR /engine
ENV LC_ALL=en_US.utf8
ENV LANG=en_US.utf8
ARG PIPENV_CHECK=1
ARG PIPENV_PYUP_API_KEY=""
RUN pipenv install --ignore-pipfile --deploy && ln -s /usr/bin/python3 /usr/bin/python && \
if [ "${PIPENV_CHECK}" == 1 ] ; then pipenv check --system -i 45185 ; fi
ADD . /engine
USER root
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"