Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed other docker files: test and gdb #1623

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docker/Dockerfile-debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ FROM fiware/orion-ld-base

ARG PATH_TO_SRC='opt/orion/'

RUN cp -a /usr/local/lib/. /usr/lib/x86_64-linux-gnu/
RUN rm -r /usr/local/lib/
RUN yum -y install hostname && \
cp -a /usr/local/lib/. /usr/lib/x86_64-linux-gnu/ && \
rm -r /usr/local/lib/

COPY . ${PATH_TO_SRC}

WORKDIR ${PATH_TO_SRC}

ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig

RUN make debug install

ENV LD_LIBRARY_PATH=/opt/paho.mqtt.c/build/output:/usr/local/lib64:/opt/prometheus-client-c/prom/build:/opt/prometheus-client-c/promhttp/build:/usr/lib/x86_64-linux-gnu/
Expand Down
79 changes: 30 additions & 49 deletions docker/Dockerfile-test
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,42 @@ RUN ls /usr/local/lib/*.so*
RUN echo "======================================================================"

ARG PATH_TO_SRC='/opt/orion/'
ENV LD_LIBRARY_PATH=/opt/paho.mqtt.c/build/output:/usr/local/lib64:/opt/prometheus-client-c/prom/build:/opt/prometheus-client-c/promhttp/build:/usr/local/lib
RUN echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH

RUN wget https://downloads.sourceforge.net/ltp/lcov-1.14.tar.gz
RUN tar -xf lcov-1.14.tar.gz
WORKDIR lcov-1.14
RUN make install
WORKDIR ${PATH_TO_SRC}

RUN yum-config-manager --disable pgdg-common

## Workaround to refresh the repo key that was baked into the base image
RUN yum --nogpgcheck --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm ; exit 0
RUN mv /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew /etc/yum.repos.d/pgdg-redhat-all.repo ; exit 0
RUN yum --nogpgcheck -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

RUN yum install --nogpgcheck -y gnupg

RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-database-tools-100.4.1.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-database-tools-extra-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-tools-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-shell-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-server-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-mongos-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/RPMS/mongodb-org-4.4.9-1.el8.x86_64.rpm
RUN yum install --nogpgcheck -y mongodb-org

RUN yum install --nogpgcheck -y python3 python2 virtualenv
RUN ln --force -s /usr/bin/python2 /usr/bin/python

RUN yum install --nogpgcheck -y openssl-devel libffi-devel

RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
RUN python2.7 get-pip.py
RUN pip2.7 install Flask
RUN pip2.7 install paho-mqtt
RUN pip2.7 install pyopenssl

# RUN yum --nogpgcheck -y install https://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/gtest-1.8.0-5.el8.x86_64.rpm
# RUN yum --nogpgcheck -y install https://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/gmock-1.8.0-5.el8.x86_64.rpm
# RUN yum --nogpgcheck -y install https://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/gmock-devel-1.8.0-5.el8.x86_64.rpm
RUN yum --nogpgcheck -y install procps gmock-devel gtest

RUN wget https://src.fedoraproject.org/repo/pkgs/gmock/gmock-1.5.0.tar.bz2/d738cfee341ad10ce0d7a0cc4209dd5e/gmock-1.5.0.tar.bz2
RUN tar xfvj gmock-1.5.0.tar.bz2
WORKDIR gmock-1.5.0
RUN ./configure
RUN make
RUN make install
WORKDIR ${PATH_TO_SRC}
ENV LD_LIBRARY_PATH=/opt/paho.mqtt.c/build/output:/usr/local/lib64:/opt/prometheus-client-c/prom/build:/opt/prometheus-client-c/promhttp/build:/usr/local/lib
# RUN echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
COPY docker/mongo.repo /etc/yum.repos.d/mongo.repo

RUN wget https://downloads.sourceforge.net/ltp/lcov-1.14.tar.gz && \
tar -xf lcov-1.14.tar.gz && \
cd lcov-1.14 && \
make install && \
cd .. && \
yum install -y gnupg && \
yum install -y mongodb-database-tools mongodb-org-database-tools-extra \
mongodb-org-tools mongodb-org-shell mongodb-org-server \
mongodb-org-mongos mongodb-org && \
yum install -y python3 python2 virtualenv && \
ln --force -s /usr/bin/python2 /usr/bin/python && \
yum install -y openssl-devel libffi-devel netcat bc diffutils hostname procps gmock-devel gtest && \
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
python2.7 get-pip.py && \
pip2.7 install Flask && \
pip2.7 install paho-mqtt && \
pip2.7 install pyopenssl && \
wget https://src.fedoraproject.org/repo/pkgs/gmock/gmock-1.5.0.tar.bz2/d738cfee341ad10ce0d7a0cc4209dd5e/gmock-1.5.0.tar.bz2 && \
tar xfvj gmock-1.5.0.tar.bz2 && \
cd gmock-1.5.0 && \
./configure && \
make && \
make install && \
cd .. && \
yum clean all && \
rm lcov-1.14.tar.gz gmock-1.5.0.tar.bz2

RUN yum install --nogpgcheck -y netcat bc diffutils hostname

COPY . ${PATH_TO_SRC}
WORKDIR ${PATH_TO_SRC}


ENTRYPOINT ["docker/build.sh"]
6 changes: 6 additions & 0 deletions docker/mongo.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
2 changes: 1 addition & 1 deletion scripts/check_files_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def ignore(root, file):
return True

# Some files in docker/ directory are not processed
if 'docker' in root and file in ['Dockerfile', 'Dockerfile-base', 'Dockerfile-ubi-base', 'Dockerfile-ubi', 'Dockerfile-test', 'Dockerfile-debug', 'Dockerfile-gdb', 'gdbinit', 'docker-compose.yml', 'subscription-manager.conf', 'ubi.repo', 'other-places.repo']:
if 'docker' in root and file in ['Dockerfile', 'Dockerfile-base', 'Dockerfile-ubi-base', 'Dockerfile-ubi', 'Dockerfile-test', 'Dockerfile-debug', 'Dockerfile-gdb', 'gdbinit', 'docker-compose.yml', 'subscription-manager.conf', 'ubi.repo', 'other-places.repo', 'mongo.repo']:
return True

# Some files in test/acceptance/behave directory are not processed
Expand Down
Loading