Skip to content

Instantly share code, notes, and snippets.

@watbulb
Last active May 17, 2020 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watbulb/a6765f547ecfc5f2666ba6e8c375d499 to your computer and use it in GitHub Desktop.
Save watbulb/a6765f547ecfc5f2666ba6e8c375d499 to your computer and use it in GitHub Desktop.
elfutils docker based image (0.179)
# elfutils docker based image
# Maintainer: https://github.com/watbulb
FROM ubuntu:latest
ENV LD_LIBRARY_PATH=/usr/local/lib
# Working directory and root
ENV BASE=/root
WORKDIR ${BASE}
# Dependencies
RUN \
apt-get update && apt-get install --no-install-recommends -y \
vim \
bash \
curl \
gawk \
flex \
make \
bison \
automake \
autoconf \
libc-dev \
zlib1g-dev \
ca-certificates \
pkg-config \
gcc-9-multilib
# Grab elfutils
RUN \
curl -O https://sourceware.org/elfutils/ftp/elfutils-latest.tar.bz2 && \
tar -xvf elfutils-latest.tar.bz2 && rm -f elfutils-latest.tar.bz2
# Compile elfutils
WORKDIR ${BASE}/elfutils-0.179
RUN autoreconf -i -f
RUN CC=gcc-9 CXX=g++-9 ./configure --disable-debuginfod --disable-dependency-tracking
RUN make -j$(nproc) && make install
# Cleanup dependencies (some)
RUN apt-get remove -y gcc-9-multilib ca-certificates && apt-get autoremove -y
RUN apt-get clean
# Fin.
WORKDIR ${BASE}
SHELL ["/bin/bash"]
ENTRYPOINT ["/bin/bash", "-i"]
@watbulb
Copy link
Author

watbulb commented May 17, 2020

Build:
docker build -t "elfutils:0.179" -f Dockerfile.elfutils .

Run:
docker run -it elfutils:0.179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment