Last active
September 20, 2019 22:07
-
-
Save zhuyifei1999/3c9e569c36d5ab9e3e793a2bd071052f to your computer and use it in GitHub Desktop.
Running gcc-with-cpychecker in Docker
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
# 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"] |
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
#! /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