bobthecow/psysh

Make an official Docker image

mtovmassian opened this issue · 1 comments

An official PsySH Docker image would be very useful to test PHP features/libraries/projects in an isolated environment.

Minimal specs could be:

  • PHP v8.1.x
  • Composer

Assembled with this kind of Dockerfile:

FROM php:8.1.11

ARG PSYSH_VERSION

RUN \
    && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
    && curl -L https://github.com/bobthecow/psysh/releases/download/$PSYSH_VERSION/psysh-$PSYSH_VERSION.tar.gz -o /tmp/psysh.tar.gz \
    && tar -xzvf /tmp/psysh.tar.gz -C /tmp \
    && chmod 755 /tmp/psysh \
    && mv /tmp/psysh /usr/local/bin

CMD ["/usr/local/bin/psysh"]

I've considered this, but I'm not sure how much value it adds. I typically grab whatever base image and add RUN curl -L https://psysh.org/psysh -o /usr/local/bin/psysh to it :)