Last active
March 5, 2022 18:49
-
-
Save lotharthesavior/d07bcdfd7dda73bf5202a86bd4437c38 to your computer and use it in GitHub Desktop.
Run php where you have only 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
FROM php:7.4 | |
RUN apt-get update && apt-get install -y \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libpng-dev \ | |
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ | |
&& docker-php-ext-install -j$(nproc) gd | |
RUN apt-get install -y libzip-dev \ | |
&& docker-php-ext-install zip |
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 | |
function php7 { | |
docker run --rm -v $(pwd):/app -w /app $(docker build -q -f $HOME/DockerImages/Dockerfile-php7 $HOME/DockerImages) php $1 $2 $3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The intention is to add the function at
php7.sh
in your bash profile.Usage: