gracewgao / pyre-docker

A Docker image to build pyre-check from source

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

pyre-check is an open source tool developed and maintained by Facebook to perform Static Code Analysis (SCA) on Python applications.

This Docker image builds pyre-check from source for a quicker & painless setup (especially on systems that are not yet officially supported)!

It runs Debian GNU/Linux 10 (buster) and has been tested on the Apple M1.

Development Setup

Before starting, ensure that Docker is installed on your computer.

  1. Clone this repository and navigate into it

    git clone https://github.com/gracewgao/pyre-docker
    cd pyre-docker
  2. Build the Docker image with the tag pyre-check (or another tag if you wish)

    docker build -t pyre-docker .
  3. Run the new image in a new container pyre-container (or another name if you wish)

    docker run \                           
    --name pyre-container \
    -v /path/to/your/directory:/src \
    -t -i \
    pyre-check /bin/bash
  4. Inside the container, run any pyre-check command now with pyre!

    Note: When initializing pyre-check with pyre init, you may have to enter the following paths for the binary and typeshed:

    ƛ No `pyre.bin` found, enter the path manually: /home/opam/pyre-check/source/_build/default/main.exe
    ƛ Unable to locate typeshed, please enter its root: /home/opam/pyre-check/stubs/typeshed/typeshed-master

Contributing

Feel free to report any bugs or installation errors that you find!

About

A Docker image to build pyre-check from source

License:MIT License


Languages

Language:Dockerfile 100.0%