Skip to content

Instantly share code, notes, and snippets.

@sshymko
Last active August 25, 2020 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sshymko/3a8035aed956500c6d02553438a51be8 to your computer and use it in GitHub Desktop.
Save sshymko/3a8035aed956500c6d02553438a51be8 to your computer and use it in GitHub Desktop.
Docker PHP with OPcache and Swoole extension & OpenSSL support
FROM php:7.4-cli
ARG SWOOLE_VERSION=swoole
RUN apt-get update -q
RUN apt-get install -y --no-install-recommends \
libssl-dev
RUN docker-php-ext-install \
opcache
RUN yes | pecl install -f ${SWOOLE_VERSION} \
&& docker-php-ext-enable swoole
@sshymko
Copy link
Author

sshymko commented Aug 24, 2020

Build specific Swoole version instead of the latest version used by default:

docker build --build-arg SWOOLE_VERSION=swoole-4.5.2 .

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