13 Июль, 2015

Запускаем PhpStorm 9.0 в Docker

Запускаем PhpStorm 9.0 на Oracle JDK 8 в Docker.

Тут все быстро, создаем Dockerfile

FROM nimmis/java:oracle-8-jdk 

ADD http://download.jetbrains.com/webide/PhpStorm-9.0.tar.gz /opt/PhpStorm-9.0.tar.gz
RUN tar xvf /opt/PhpStorm-9.0.tar.gz -C /opt/
RUN rm -fv /opt/PhpStorm-9.0.tar.gz

RUN apt-get update && apt-get install -y php5-cli x11-utils


# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
    mkdir -p /home/developer && \
    echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
    echo "developer:x:${uid}:" >> /etc/group && \
    echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
    chmod 0440 /etc/sudoers.d/developer && \
    chown ${uid}:${gid} -R /home/developer

USER developer
ENV HOME /home/developer
CMD /opt/PhpStorm-141.1912/bin/phpstorm.sh

Запускаем билд

docker build -t phpstorm . 

Запускаем PHPstorm

docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix phpstorm
Home