$ docker build -t rpm .
$ docker run --name rpm --privileged --rm --cap-add=SYS_PTRACE --security-opt="seccomp=unconfined" -p 12345:12345 -it rpm
Last active
May 3, 2019 18:08
-
-
Save knqyf263/a50ae1962e5b2727409a427a9fce8dfa to your computer and use it in GitHub Desktop.
rpm debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 | |
RUN yum -y update \ | |
&& yum -y groupinstall "Development tools" \ | |
&& yum -y install git vim openssl openssl-devel nspr nspr-devel nss nss-devel \ | |
file file-devel popt popt-devel lua-static lua-devel db4 db4-devel wget tar \ | |
libarchive libarchive-devel strace gdb-gdbserver libdb-devel lzma xz-devel | |
RUN git clone https://github.com/rpm-software-management/rpm.git \ | |
&& cd rpm \ | |
&& git checkout rpm-4.11.3-release \ | |
&& ./autogen.sh --noconfigure \ | |
&& sed -i -e 's/-g -O2/-g3 -O0/g' configure \ | |
&& ./configure --with-external-db "CPPFLAGS=-I/usr/include/libdb -I/usr/include/nss3 -I/usr/include/nspr4" --enable-debug --with-lzma \ | |
&& make \ | |
&& make install \ | |
&& mkdir -p /usr/local/var/lib/ \ | |
&& cp -r /var/lib/rpm/ /usr/local/var/lib/ | |
CMD ["gdbserver", ":12345", "/rpm/.libs/rpm", "-qa"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment