Skip to content

Commit

Permalink
feat(PHP): install Swoole
Browse files Browse the repository at this point in the history
  • Loading branch information
leon0399 committed Jul 30, 2024
1 parent f912905 commit 498f8e6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@ on:
branches:
- master

pull_request:
paths:
- Dockerfile

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
# set latest tag for master branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -35,6 +50,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
pull: true
tags: ghcr.io/${{ github.repository }}:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ FROM ${IMAGE}

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update \
&& apt install -y \
RUN apt-get update \
&& apt-get install -y \
git \
curl \
wget \
Expand Down Expand Up @@ -42,7 +42,7 @@ RUN apt update \
WORKDIR /opt

# C++
RUN apt install -y \
RUN apt-get install -y \
gcc \
clang

Expand All @@ -52,7 +52,7 @@ RUN apt install -y \
# # && cgmemtime --setup -g $(getent group $(id -g) | cut -d: -f1) --perm 775

# Python
RUN apt install -y \
RUN apt-get install -y \
python3 \
python3-pip \
python3-full \
Expand Down Expand Up @@ -80,9 +80,11 @@ RUN wget --progress=dot:giga -O - \
ARG PHP=8.3
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list \
&& wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - \
&& apt update \
&& apt install -y \
php${PHP}
&& apt-get update \
&& apt-get install -y \
php${PHP} \
php${PHP}-dev \
&& pecl install openswoole

# JavaScript
ARG NODE=20.11.0
Expand All @@ -108,7 +110,7 @@ RUN wget -O - https://sh.rustup.rs | sh -s -- -y
ENV PATH="/opt/.cargo/bin:${PATH}"

# Groovy
RUN apt install -y \
RUN apt-get install -y \
groovy

# Kotlin
Expand Down Expand Up @@ -165,7 +167,7 @@ RUN gu available \
&& export GRAALVM_LLVM_TOOLCHAIN=$(graalvm.lli --print-toolchain-path)

# Fortran
RUN apt install -y \
RUN apt-get install -y \
gfortran

# Swift
Expand All @@ -175,7 +177,7 @@ RUN wget --progress=dot:giga -O - \
ENV PATH="/opt/swift-${SWIFT}-RELEASE-debian12/usr/bin:${PATH}"

# Lua
RUN apt install -y \
RUN apt-get install -y \
lua5.4 \
luajit

Expand Down

0 comments on commit 498f8e6

Please sign in to comment.