Skip to content

Instantly share code, notes, and snippets.

@adlawson
Created October 9, 2018 12:10
Show Gist options
  • Save adlawson/9cbb0cbbbc2cbc6e4173e20ec843eebd to your computer and use it in GitHub Desktop.
Save adlawson/9cbb0cbbbc2cbc6e4173e20ec843eebd to your computer and use it in GitHub Desktop.
PHP w/ Oauth for Ed
FROM php:7
RUN apt-get update && \
apt-get install -y libpcre3-dev && \
pecl install oauth && \
echo "extension=oauth.so" >> /usr/local/etc/php/conf.d/oauth.ini
@adlawson
Copy link
Author

adlawson commented Oct 9, 2018

Step 1

Write the contents of Dockerfile (above) to a file called Dockerfile

Step 2

docker build -t php-with-oauth .

Step 3

docker run -it --rm d:/path/to/my/php/project:/usr/src php-with-oauth -f myscript.php

@adlawson
Copy link
Author

adlawson commented Oct 9, 2018

You can also check the modules installed with

docker run -it --rm d:/path/to/my/php/project:/usr/src php-with-oauth -m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment