Skip to content

Instantly share code, notes, and snippets.

@zhuyifei1999
Last active September 20, 2019 22:07
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 zhuyifei1999/3c9e569c36d5ab9e3e793a2bd071052f to your computer and use it in GitHub Desktop.
Save zhuyifei1999/3c9e569c36d5ab9e3e793a2bd071052f to your computer and use it in GitHub Desktop.
Running gcc-with-cpychecker in Docker
# docker build -t gcc-with-cpychecker .
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y git g++-6 gcc-6-plugin-dev python3.7 libpython3.7 libpython3.7-dev python3-dev python3-six python3-pygments graphviz python3-lxml make
WORKDIR /usr/local/src
RUN git clone --branch v0.17 https://github.com/davidmalcolm/gcc-python-plugin.git gcc-python-plugin
WORKDIR /usr/local/src/gcc-python-plugin
RUN CC=gcc-6 CXX=g++-6 make PYTHON=python3 PYTHON_CONFIG=python3-config plugin
RUN ln -sfn /usr/bin/python3.7 /usr/bin/python
ENV CC_FOR_CPYCHECKER=gcc-6
ENTRYPOINT ["/usr/local/src/gcc-python-plugin/gcc-with-cpychecker", "--cpychecker-verbose"]
#! /bin/bash
if [ -t 0 ] ; then
docker run --rm -v "$PWD:$PWD" -w "$PWD" -ti gcc-with-cpychecker "$@"
else
docker run --rm -v "$PWD:$PWD" -w "$PWD" gcc-with-cpychecker "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment