Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker build scripts for alpine and ubuntu #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

8ctopus
Copy link
Contributor

@8ctopus 8ctopus commented Nov 16, 2020

Hello Sylvain,

I've created spx.so build scripts using docker BUILDKIT for my personal use and maybe you'll find it an interesting addition to your project.

The idea is that it's not always convenient to use an existing machine to build SPX from source. Thanks to the build scripts, new users get a faster ride to use SPX as they just need to add spx.so, spx.ini and the assets to the server. I can update the readme if you're interested to merge the PR.

@NoiseByNorthwest
Copy link
Owner

Hi,

TBH I think it's a welcome improvement as distribution / installation is clearly a weak point.
But regarding the way to do it I've the following requirements:

  • binaries should be automatically built for each pushed tag
  • binaries should be best stored as release assets
  • build matrix should also include the PHP version's dimension
  • Web UI files should be distributed alongside the binary
  • and what about going a step further by generating rpm & deb packages ?

@8ctopus
Copy link
Contributor Author

8ctopus commented Nov 18, 2020

  1. and 2. maybe Github actions? what do you think?
  2. and 4. are easy.
  3. I have no packaging experience, do you?

@NoiseByNorthwest
Copy link
Owner

I've no experience with github actions, but since it is closely integrated with github (I however dont know how it simplifies things such as github API auth) it looks like a quite good default choice.

  • I have no packaging experience, do you?

It is fairly easy with https://github.com/jordansissel/fpm

@kandy
Copy link

kandy commented Apr 13, 2021

I use this sample to install in my Dockerfile that based on official php image

RUN git clone https://github.com/NoiseByNorthwest/php-spx.git  \
    --depth 1  --single-branch --branch master /usr/src/php/ext/spx && \
  docker-php-ext-install -j$(nproc) spx

@krokyze
Copy link

krokyze commented Dec 1, 2023

I use this sample to install in my Dockerfile that based on official php image

RUN git clone https://github.com/NoiseByNorthwest/php-spx.git  \
    --depth 1  --single-branch --branch master /usr/src/php/ext/spx && \
  docker-php-ext-install -j$(nproc) spx

Thank you for these fine lines! For those seeking an example of a PHP FPM Alpine-based Dockerfile:

RUN apk add zlib-dev && git clone https://github.com/NoiseByNorthwest/php-spx.git --depth 1  --single-branch --branch master /usr/src/php/ext/spx && \
    install-php-extensions spx
RUN echo "spx.http_enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-spx.ini && \
    echo "spx.http_key=dev" >> /usr/local/etc/php/conf.d/docker-php-ext-spx.ini && \
    echo "spx.http_ip_whitelist=*" >> /usr/local/etc/php/conf.d/docker-php-ext-spx.ini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants