├── .gitignore ├── .dockerignore ├── .github ├── scripts │ ├── prep-environment.sh │ └── get-matrix.sh └── workflows │ └── ci.yml ├── systemctl-shim ├── LICENSE ├── README.md ├── Dockerfile_focal └── Dockerfile_jammy /.gitignore: -------------------------------------------------------------------------------- 1 | /install.sh 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .github/ 3 | .gitignore 4 | README.md 5 | LICENSE -------------------------------------------------------------------------------- /.github/scripts/prep-environment.sh: -------------------------------------------------------------------------------- 1 | platform=$(echo "${PLATFORM:?}" | cut -d '/' -f 2-3) 2 | 3 | case $platform in 4 | 386) platform='i386' ;; 5 | arm64) platform='arm64v8' ;; 6 | arm/v7) platform='arm32v7' ;; 7 | esac 8 | 9 | tags=$(echo "${TAGS:?}" | awk 'BEGIN{FS=OFS=","} NR==1{for (i=1;i<=NF;i++) $i="permafrostsoftware/laravel-node:"$i} 1') 10 | ptags=$(echo "$TAGS" | awk -v platform="$platform" 'BEGIN{FS=OFS=","} NR==1{for (i=1;i<=NF;i++) $i="permafrostsoftware/laravel-node:"$i"-"platform} 1') 11 | key=$(echo -n "$tags $ptags" | openssl dgst -sha256 | cut -d ' ' -f 2) 12 | 13 | multi='linux/amd64,linux/arm64' 14 | 15 | echo ::set-output name=tags::${tags} 16 | echo ::set-output name=ptags::${ptags} 17 | echo ::set-output name=key::${key} 18 | echo ::set-output name=multi::${multi} -------------------------------------------------------------------------------- /.github/scripts/get-matrix.sh: -------------------------------------------------------------------------------- 1 | platforms=(linux/amd64) 2 | # linux/arm64 3 | tags=('latest' 'jammy,2204' 'focal,2004') 4 | matrix=() 5 | for platform in "${platforms[@]}"; do 6 | for tag in "${tags[@]}"; do 7 | if [[ "$tag" =~ latest ]]; then 8 | base="ubuntu:22.04" 9 | file="jammy" 10 | elif [[ "$tag" =~ jammy ]]; then 11 | base="ubuntu:22.04" 12 | file="jammy" 13 | elif [[ "$tag" =~ focal ]]; then 14 | base="ubuntu:20.04" 15 | file="focal" 16 | fi 17 | build_args="type=full" 18 | matrix+=("{\"platform\": \"$platform\", \"tags\": \"$tag\", \"base\": \"$base\", \"build_args\": \"$build_args\", \"file\": \"$file\"}") 19 | done 20 | done 21 | echo "::set-output name=matrix::{\"include\":[$(echo "${matrix[@]}" | sed -e 's|} {|}, {|g')]}" 22 | -------------------------------------------------------------------------------- /systemctl-shim: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CMD=service 4 | SERVICE=${2%".service"} 5 | 6 | case "$1" in 7 | start) 8 | "${CMD}" "$SERVICE" start 9 | ;; 10 | 11 | stop) 12 | "${CMD}" "$SERVICE" stop 13 | ;; 14 | 15 | status) 16 | "${CMD}" "$SERVICE" status 17 | ;; 18 | 19 | restart) 20 | "${CMD}" "$SERVICE" restart 21 | ;; 22 | 23 | reload|force-reload) 24 | "${CMD}" "$SERVICE" reload 25 | ;; 26 | 27 | *enable|*disable|*active) 28 | echo "systemctl is a sysVinit wrapper and does not support this operation" 29 | exit 1; 30 | ;; 31 | 32 | daemon-reload) 33 | ;; 34 | 35 | *) 36 | echo "Usage: $0 {start|stop|status|restart|reload|force-reload}" 37 | exit 1 38 | 39 | esac 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020-2022 Permafrost Software 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | 8 | get-matrix: 9 | if: ${{ !contains(github.event.head_commit.message, 'skip-build') }} 10 | runs-on: ubuntu-latest 11 | outputs: 12 | matrix: ${{ steps.set-matrix.outputs.matrix }} 13 | 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | 18 | - name: output matrix 19 | id: set-matrix 20 | run: bash .github/scripts/get-matrix.sh 21 | 22 | build-amd64: 23 | needs: get-matrix 24 | if: ${{ !contains(github.event.head_commit.message, 'skip-build') }} 25 | name: Build amd64 26 | strategy: 27 | fail-fast: false 28 | matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}} 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | 34 | - name: Prep 35 | id: prep 36 | run: bash .github/scripts/prep-environment.sh 37 | env: 38 | PLATFORM: ${{ matrix.platform }} 39 | TAGS: ${{ matrix.tags }} 40 | FILE: ${{ matrix.file }} 41 | 42 | - name: Set up QEMU 43 | if: steps.prep.outcome == 'success' 44 | uses: docker/setup-qemu-action@v2 45 | 46 | - name: Set up Docker Buildx 47 | if: steps.prep.outcome == 'success' 48 | uses: docker/setup-buildx-action@v2 49 | 50 | - name: Cache Docker layers 51 | if: steps.prep.outcome == 'success' 52 | uses: actions/cache@v3 53 | with: 54 | path: /tmp/.buildx-cache 55 | key: "${{ steps.prep.outputs.key }}-buildx-${{ github.sha }}-20220222" 56 | restore-keys: "${{ steps.prep.outputs.key }}-buildx-${{ github.sha }}-20220222" 57 | 58 | - name: Login to DockerHub 59 | uses: docker/login-action@v2 60 | with: 61 | username: ${{ secrets.DOCKERHUB_USERNAME }} 62 | password: ${{ secrets.DOCKERHUB_TOKEN }} 63 | 64 | - name: Build specific arch 65 | uses: docker/build-push-action@v3 66 | with: 67 | push: true 68 | file: ./Dockerfile_${{ matrix.file }} 69 | platforms: ${{ matrix.platform }} 70 | tags: ${{ steps.prep.outputs.ptags }} 71 | build-args: ${{ matrix.build_args }} 72 | cache-from: type=local,src=/tmp/.buildx-cache 73 | cache-to: type=local,dest=/tmp/.buildx-cache -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # laravel-act-docker 2 | ## `permafrostsoftware/laravel-node` 3 | 4 | Build status LICENSE Docker Image Size 5 | 6 | Docker images for use with [`nektos/act`](https://github.com/nektos/act) when running workflows for Laravel packages and projects locally. 7 | 8 | To use this image with `act`, run a command similar to the following: 9 | 10 | ```text 11 | act -P ubuntu-latest=permafrostsoftware/laravel-node:latest -W .github/workflows/run-tests.yml 12 | ``` 13 | 14 | ![image](https://user-images.githubusercontent.com/5508707/206807184-7e0c4dcb-f0b9-4acb-b16d-004c28865c1e.png) 15 | 16 | 17 | ## Namespaces 18 | 19 | `permafrostsoftware/laravel-node` - [View on DockerHub](https://hub.docker.com/r/permafrostsoftware/laravel-node/tags) 20 | 21 | ## Platforms/OS Architecture 22 | 23 | - `linux/amd64` or `amd64` 24 | - `linux/arm64` or `arm64v8` 25 | 26 | ## Image Variants/Tags 27 | 28 | ### `latest` 29 | 30 | - Ubuntu 22.04 (focal) 31 | - PHP 7.2 to PHP 8.2 32 | - PHP extensions: `bcmath`, `curl`, `dom`, `fileinfo`, `gd`, `iconv`, `intl`, `json`, `mbstring`, `mysql`, `pdo`, `pdo_mysql`, `pdo_sqlite`, `sqlite3`, `xml`, `zip`, `xdebug` 33 | - Node.js 16.18.1 34 | - Yarn 1.22.19 35 | 36 | ### `jammy`, `2204` 37 | 38 | - Ubuntu 22.04 (jammy) 39 | - PHP 7.2 to PHP 8.2 40 | - PHP extensions: `bcmath`, `curl`, `dom`, `fileinfo`, `gd`, `iconv`, `intl`, `json`, `mbstring`, `mysql`, `pdo`, `pdo_mysql`, `pdo_sqlite`, `sqlite3`, `xml`, `zip`, `xdebug` 41 | - Node.js 16.18.1 42 | - Yarn 1.22.19 43 | 44 | ### `focal`, `2004` 45 | 46 | - Ubuntu 20.04 (focal) 47 | - PHP 7.2 to PHP 8.2 48 | - PHP extensions: `bcmath`, `curl`, `dom`, `fileinfo`, `gd`, `iconv`, `intl`, `json`, `mbstring`, `mysql`, `pdo`, `pdo_mysql`, `pdo_sqlite`, `sqlite3`, `xml`, `zip`, `xdebug` 49 | - Node.js 16.18.1 50 | - Yarn 1.22.19 51 | 52 | ## Platform/OS Architecture specific tags 53 | 54 | - Suffix `amd64`, `arm64v8` to above image variants to get image for specific OS architecture. 55 | For example `permafrostsoftware/laravel-node:focal-arm64v8` 56 | 57 | ## License 58 | 59 | The code in this project is licensed under the [MIT license](http://choosealicense.com/licenses/mit/). 60 | Please see the [license file](LICENSE) for more information. 61 | 62 | ## Dependencies 63 | - [Node.js docker](https://github.com/nodejs/docker-node/blob/master/LICENSE) 64 | - [Node.js and related software](https://github.com/nodejs/node/blob/master/LICENSE) 65 | - [PHP](https://github.com/php/php-src/blob/master/LICENSE) 66 | - [Xdebug](https://github.com/xdebug/xdebug/blob/master/LICENSE) 67 | - [Yarn](https://github.com/yarnpkg/yarn/blob/master/LICENSE) 68 | -------------------------------------------------------------------------------- /Dockerfile_focal: -------------------------------------------------------------------------------- 1 | FROM ubuntu:focal 2 | ARG type 3 | ENV CONTAINER permafrostsoftware/laravel-node 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV NODE_VERSION 16.18.1 6 | ENV NODE_VERSION_x86 16.18.1 7 | ENV YARN_VERSION 1.22.19 8 | ENV RUNNER_TOOL_PATH "/opt/hostedtoolcache" 9 | ENV RUNNER_TOOL_CACHE "/opt/hostedtoolcache" 10 | ENV GITHUB_ENV "/tmp/set_env" 11 | ENV GITHUB_PATH "/tmp/add_path" 12 | ENV runner "self-hosted" 13 | 14 | RUN ARCH= && MULTILIB= && PREFIX='www' && URLPATH='dist' && dpkgArch="$(dpkg --print-architecture)" \ 15 | && case "${dpkgArch##*-}" in \ 16 | amd64) ARCH='x64';; \ 17 | ppc64el) ARCH='ppc64le';; \ 18 | s390x) ARCH='s390x';; \ 19 | arm64) ARCH='arm64';; \ 20 | armhf) ARCH='armv7l';; \ 21 | i386) ARCH='x86'; MULTILIB='gcc-multilib'; PREFIX='unofficial-builds'; URLPATH='download/release'; NODE_VERSION=$NODE_VERSION_x86;; \ 22 | *) echo "unsupported architecture"; exit 1 ;; \ 23 | esac \ 24 | && set -ex \ 25 | && echo "" | tee "$GITHUB_ENV" "$GITHUB_PATH" \ 26 | && mkdir -p "$RUNNER_TOOL_CACHE" \ 27 | && apt-get update && apt-get install -y ca-certificates curl wget dnsutils gnupg dirmngr xz-utils libatomic1 $MULTILIB --no-install-recommends \ 28 | && rm -rf /var/lib/apt/lists/* \ 29 | && curl -fsSLO --compressed "https://$PREFIX.nodejs.org/$URLPATH/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 30 | && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ 31 | && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 32 | && curl -o /usr/local/bin/spc -sL https://github.com/shivammathur/spc/releases/latest/download/spc \ 33 | && curl -o /usr/local/bin/systemctl -sL https://raw.githubusercontent.com/shivammathur/node-docker/main/systemctl-shim \ 34 | && chmod a+x /usr/local/bin/spc /usr/local/bin/systemctl \ 35 | && apt-mark auto '.*' > /dev/null \ 36 | && apt-mark manual curl libatomic1 $MULTILIB \ 37 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 38 | | awk '/=>/ { print $(NF-1) }' \ 39 | | sort -u \ 40 | | xargs -r dpkg-query --search \ 41 | | cut -d: -f1 \ 42 | | sort -u \ 43 | | xargs -r apt-mark manual \ 44 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 45 | && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ 46 | # smoke tests 47 | && node --version \ 48 | && npm --version \ 49 | && spc -V 50 | 51 | RUN set -ex \ 52 | && savedAptMark="$(apt-mark showmanual)" \ 53 | && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr make sudo --no-install-recommends \ 54 | && rm -rf /var/lib/apt/lists/* \ 55 | && curl -fsSLO --compressed "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ 56 | && mkdir -p /opt /opt/hostedtoolcache \ 57 | && chmod -R 777 /opt/hostedtoolcache \ 58 | && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ 59 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ 60 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ 61 | && rm yarn-v$YARN_VERSION.tar.gz \ 62 | && apt-mark auto '.*' > /dev/null \ 63 | && apt-mark manual ca-certificates sudo make \ 64 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 65 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 66 | | awk '/=>/ { print $(NF-1) }' \ 67 | | sort -u \ 68 | | xargs -r dpkg-query --search \ 69 | | cut -d: -f1 \ 70 | | sort -u \ 71 | | xargs -r apt-mark manual \ 72 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 73 | # smoke test 74 | && yarn --version 75 | 76 | RUN if [ "$type" = "full" ]; then set -ex \ 77 | && savedAptMark="$(apt-mark showmanual)" \ 78 | && apt-mark auto '.*' > /dev/null \ 79 | && apt-get update && apt-get install -y --no-install-recommends curl dnsutils gnupg jq lsb-release mysql-server postgresql software-properties-common unzip \ 80 | && usermod -d /var/lib/mysql/ mysql \ 81 | && add-apt-repository ppa:git-core/ppa -y \ 82 | && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php \ 83 | && apt-get remove software-properties-common -y \ 84 | && apt-get update \ 85 | && cp -r /etc/apt/sources.list.d /etc/apt/sources.list.d.save \ 86 | && apt-get install -y --no-install-recommends bind9-dnsutils bind9-host bind9-libs dnsutils libjson-c5 liblmdb0 libmaxminddb0 libuv1 \ 87 | && apt-get install -y --no-install-recommends php8.2 \ 88 | php8.2-bcmath \ 89 | php8.2-curl \ 90 | php8.2-dev \ 91 | php8.2-gd \ 92 | php8.2-intl \ 93 | php8.2-mbstring \ 94 | php8.2-mysql \ 95 | php8.2-pgsql \ 96 | php8.2-soap \ 97 | php8.2-sqlite3 \ 98 | php8.2-xml \ 99 | php8.2-zip; \ 100 | for v in 7.2 7.3 7.4 8.0 8.1; do \ 101 | apt-get install -y --no-install-recommends php"$v" \ 102 | php"$v"-bcmath \ 103 | php"$v"-curl \ 104 | php"$v"-dev \ 105 | php"$v"-gd \ 106 | php"$v"-imagick \ 107 | php"$v"-intl \ 108 | php"$v"-mbstring \ 109 | php"$v"-mysql \ 110 | php"$v"-pgsql \ 111 | php"$v"-soap \ 112 | php"$v"-sqlite3 \ 113 | php"$v"-xdebug \ 114 | php"$v"-xml \ 115 | php"$v"-zip; \ 116 | done \ 117 | && curl -o /usr/bin/systemctl -sL https://raw.githubusercontent.com/shivammathur/node-docker/main/systemctl-shim \ 118 | && chmod a+x /usr/bin/systemctl \ 119 | && curl -o /usr/lib/ssl/cert.pem -sL https://curl.se/ca/cacert.pem \ 120 | && curl -o /tmp/pear.phar -sL https://raw.githubusercontent.com/pear/pearweb_phars/master/install-pear-nozlib.phar \ 121 | && php /tmp/pear.phar && sudo rm -f /tmp/pear.phar \ 122 | && apt-get install -y --no-install-recommends autoconf automake gcc g++ git \ 123 | && rm -rf /var/lib/apt/lists/* \ 124 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 125 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 126 | | awk '/=>/ { print $(NF-1) }' \ 127 | | sort -u \ 128 | | xargs -r dpkg-query --search \ 129 | | cut -d: -f1 \ 130 | | sort -u \ 131 | | xargs -r apt-mark manual \ 132 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 133 | # smoke test 134 | && gcc --version \ 135 | && g++ --version \ 136 | && git --version \ 137 | && php7.2 -v \ 138 | && php7.3 -v \ 139 | && php7.4 -v \ 140 | && php8.0 -v \ 141 | && php8.1 -v \ 142 | && php8.2 -v \ 143 | && php -v; \ 144 | fi 145 | 146 | CMD [ "/bin/bash" ] 147 | -------------------------------------------------------------------------------- /Dockerfile_jammy: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy 2 | ARG type 3 | ENV CONTAINER permafrostsoftware/laravel-node 4 | ENV DEBIAN_FRONTEND=noninteractive 5 | ENV NODE_VERSION 16.18.1 6 | ENV NODE_VERSION_x86 16.18.1 7 | ENV YARN_VERSION 1.22.19 8 | ENV RUNNER_TOOL_PATH "/opt/hostedtoolcache" 9 | ENV RUNNER_TOOL_CACHE "/opt/hostedtoolcache" 10 | ENV GITHUB_ENV "/tmp/set_env" 11 | ENV GITHUB_PATH "/tmp/add_path" 12 | ENV runner "self-hosted" 13 | 14 | RUN ARCH= && MULTILIB= && PREFIX='www' && URLPATH='dist' && dpkgArch="$(dpkg --print-architecture)" \ 15 | && case "${dpkgArch##*-}" in \ 16 | amd64) ARCH='x64';; \ 17 | ppc64el) ARCH='ppc64le';; \ 18 | s390x) ARCH='s390x';; \ 19 | arm64) ARCH='arm64';; \ 20 | armhf) ARCH='armv7l';; \ 21 | i386) ARCH='x86'; MULTILIB='gcc-multilib'; PREFIX='unofficial-builds'; URLPATH='download/release'; NODE_VERSION=$NODE_VERSION_x86;; \ 22 | *) echo "unsupported architecture"; exit 1 ;; \ 23 | esac \ 24 | && set -ex \ 25 | && echo "" | tee "$GITHUB_ENV" "$GITHUB_PATH" \ 26 | && mkdir -p "$RUNNER_TOOL_CACHE" \ 27 | # libatomic1 for arm 28 | && apt-get update && apt-get install -y ca-certificates curl dnsutils wget gnupg dirmngr xz-utils libatomic1 $MULTILIB --no-install-recommends \ 29 | && rm -rf /var/lib/apt/lists/* \ 30 | && curl -fsSLO --compressed "https://$PREFIX.nodejs.org/$URLPATH/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 31 | && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ 32 | && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 33 | && curl -o /usr/local/bin/spc -sL https://github.com/shivammathur/spc/releases/latest/download/spc \ 34 | && curl -o /usr/local/bin/systemctl -sL https://raw.githubusercontent.com/shivammathur/node-docker/main/systemctl-shim \ 35 | && chmod a+x /usr/local/bin/spc /usr/local/bin/systemctl \ 36 | && apt-mark auto '.*' > /dev/null \ 37 | && apt-mark manual curl libatomic1 $MULTILIB \ 38 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 39 | | awk '/=>/ { print $(NF-1) }' \ 40 | | sort -u \ 41 | | xargs -r dpkg-query --search \ 42 | | cut -d: -f1 \ 43 | | sort -u \ 44 | | xargs -r apt-mark manual \ 45 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 46 | && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ 47 | # smoke tests 48 | && node --version \ 49 | && npm --version \ 50 | && spc -V 51 | 52 | RUN set -ex \ 53 | && savedAptMark="$(apt-mark showmanual)" \ 54 | && apt-get update && apt-get install -y ca-certificates curl dnsutils wget gnupg dirmngr make sudo --no-install-recommends \ 55 | && rm -rf /var/lib/apt/lists/* \ 56 | && curl -fsSLO --compressed "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ 57 | && mkdir -p /opt /opt/hostedtoolcache \ 58 | && chmod -R 777 /opt/hostedtoolcache \ 59 | && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ 60 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ 61 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ 62 | && rm yarn-v$YARN_VERSION.tar.gz \ 63 | && apt-mark auto '.*' > /dev/null \ 64 | && apt-mark manual ca-certificates sudo make \ 65 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 66 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 67 | | awk '/=>/ { print $(NF-1) }' \ 68 | | sort -u \ 69 | | xargs -r dpkg-query --search \ 70 | | cut -d: -f1 \ 71 | | sort -u \ 72 | | xargs -r apt-mark manual \ 73 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 74 | # smoke test 75 | && yarn --version 76 | 77 | RUN if [ "$type" = "full" ]; then set -ex \ 78 | && savedAptMark="$(apt-mark showmanual)" \ 79 | && apt-mark auto '.*' > /dev/null \ 80 | && apt-get update && apt-get install -y --no-install-recommends curl dnsutils gnupg jq lsb-release mysql-server postgresql software-properties-common unzip \ 81 | && usermod -d /var/lib/mysql/ mysql \ 82 | && add-apt-repository ppa:git-core/ppa -y \ 83 | && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php \ 84 | && apt-get remove software-properties-common -y \ 85 | && apt-get update \ 86 | && cp -r /etc/apt/sources.list.d /etc/apt/sources.list.d.save \ 87 | && apt-get install -y --no-install-recommends bind9-dnsutils bind9-host bind9-libs dnsutils libjson-c5 liblmdb0 libmaxminddb0 libuv1 \ 88 | && apt-get install -y --no-install-recommends php8.2 \ 89 | php8.2-bcmath \ 90 | php8.2-curl \ 91 | php8.2-dev \ 92 | php8.2-gd \ 93 | php8.2-intl \ 94 | php8.2-mbstring \ 95 | php8.2-mysql \ 96 | php8.2-pgsql \ 97 | php8.2-soap \ 98 | php8.2-sqlite3 \ 99 | php8.2-xml \ 100 | php8.2-zip; \ 101 | for v in 7.2 7.3 7.4 8.0 8.1; do \ 102 | apt-get install -y --no-install-recommends php"$v" \ 103 | php"$v"-bcmath \ 104 | php"$v"-curl \ 105 | php"$v"-dev \ 106 | php"$v"-gd \ 107 | php"$v"-imagick \ 108 | php"$v"-intl \ 109 | php"$v"-mbstring \ 110 | php"$v"-mysql \ 111 | php"$v"-pgsql \ 112 | php"$v"-soap \ 113 | php"$v"-sqlite3 \ 114 | php"$v"-xdebug \ 115 | php"$v"-xml \ 116 | php"$v"-zip; \ 117 | done \ 118 | && curl -o /usr/bin/systemctl -sL https://raw.githubusercontent.com/shivammathur/node-docker/main/systemctl-shim \ 119 | && chmod a+x /usr/bin/systemctl \ 120 | && curl -o /usr/lib/ssl/cert.pem -sL https://curl.se/ca/cacert.pem \ 121 | && curl -o /tmp/pear.phar -sL https://raw.githubusercontent.com/pear/pearweb_phars/master/install-pear-nozlib.phar \ 122 | && php /tmp/pear.phar && sudo rm -f /tmp/pear.phar \ 123 | && apt-get install -y --no-install-recommends autoconf automake gcc g++ git \ 124 | && rm -rf /var/lib/apt/lists/* \ 125 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 126 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 127 | | awk '/=>/ { print $(NF-1) }' \ 128 | | sort -u \ 129 | | xargs -r dpkg-query --search \ 130 | | cut -d: -f1 \ 131 | | sort -u \ 132 | | xargs -r apt-mark manual \ 133 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 134 | # smoke test 135 | && gcc --version \ 136 | && g++ --version \ 137 | && git --version \ 138 | && php7.2 -v \ 139 | && php7.3 -v \ 140 | && php7.4 -v \ 141 | && php8.0 -v \ 142 | && php8.1 -v \ 143 | && php8.2 -v \ 144 | && php -v; \ 145 | fi 146 | 147 | CMD [ "/bin/bash" ] 148 | --------------------------------------------------------------------------------