Last active
December 19, 2018 07:45
-
-
Save maemichi-monosense/5a5e937cfc27dcbab61e89901321dac1 to your computer and use it in GitHub Desktop.
PsySH docker
This file contains hidden or 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 | |
| repo=psysh | |
| docker build . -t "$repo" | |
| for v in 7 7.1 7.2 7.3; do | |
| docker build . -t "$repo:$v" \ | |
| --build-arg php_version="$v" \ | |
| ; | |
| for l in en ja; do | |
| tag="$v-$l" | |
| docker build . -t "$repo:$tag" \ | |
| --build-arg php_version="$v" \ | |
| --build-arg man_lang="$l" \ | |
| ; | |
| done | |
| done | |
| docker image ls "$repo" |
This file contains hidden or 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
| ARG php_version="latest" | |
| FROM php:${php_version} | |
| ARG man_lang="en" | |
| ADD https://psysh.org/psysh /usr/local/bin/ | |
| RUN chmod +x /usr/local/bin/psysh | |
| ENV HOME /root | |
| ENV DOC_PATH $HOME/.local/share/psysh/ | |
| RUN mkdir -p $DOC_PATH | |
| ENV MAN_URL http://psysh.org/manual/${man_lang}/php_manual.sqlite | |
| ADD $MAN_URL $DOC_PATH | |
| CMD psysh |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO
$HOMEalpineoption