Coder Social home page Coder Social logo

docker-psalm's Introduction

Docker Image for vimeo/psalm

This repository contains everything to build a simple Docker image to run Psalm. The image will also include a few Psalm plugins.

The image is built for the amd64 and arm64 platforms. A GitHub Actions workflow is used to build the image weekly, so the PHP version used should be up-to-date and new Psalm versions should show up automatically.

Running the Published Image

The resulting image is published at https://ghcr.io/webfactory/psalm.

To use it: docker run -it --rm --init -v $(pwd):/app ghcr.io/webfactory/psalm, possibly followed by psalm arguments and options.

If you want to use psalm-plugin to list, enable or otherwise deal with plugins, use:

docker run -it --rm --init -v $(pwd):/app --entrypoint=psalm-plugin ghcr.io/webfactory/psalm, possibly followed by psalm-plugin arguments and options.

Using a Cache for Psalm

If you want to use Psalm's caching feature to speed up analysis, mount a directory or Docker volume at /cache.

For example, run docker run -it --rm --init -v $(pwd):/app -v $HOME/.cache:/cache ghcr.io/webfactory/psalm ...

Building the Image yourself

Review and/or tweak the Dockerfile as necessary.

Then, run docker build -t psalm ..

To use your own image, use psalm instead of ghcr.io/webfactory/psalm in the commands from the previous section.

docker-psalm's People

Contributors

mpdude avatar relthyg avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-psalm's Issues

Why?

What are the benefits of running Psalm, along with extensions, in a Docker image, instead of declaring it as a dev dependency of the application we analyse with Psalm (like the documentation proposes)?

Allow loading Psalm plugins from the application source code

More and more PHP libraries bring their own Psalm plugins with them (like https://github.com/CuyZ/Valinor for example). The plugin either comes as a separate composer package to be composer required by the application, or is directly integrated into the main library package.

Sadly, declaring other plugins than the ones shipped with the container is currently not possible, as namespaces in the psalm.xml of the repository we want to analyse will not refer to our repository, but to the internal namespaces of the container.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.