├── .github └── workflows │ └── semgrep.yml ├── .gitignore ├── .travis.yml ├── BUILD.md ├── Dockerfile ├── LICENSE ├── README.md ├── build ├── builder ├── Dockerfile ├── README.md └── scripts │ ├── docker-entrypoint.sh │ └── mkimage-phan.bash ├── templates ├── test │ └── test_cloudflare_phan.bats └── versions │ ├── Dockerfile │ └── options ├── test ├── fixtures │ ├── fail │ │ └── undefined_class.php │ └── pass │ │ └── pass.php ├── test_cloudflare_phan-0.8.0.bats ├── test_cloudflare_phan-0.8.1.bats ├── test_cloudflare_phan-0.8.2.bats ├── test_cloudflare_phan-0.8.3.bats ├── test_cloudflare_phan-0.8.4.bats ├── test_cloudflare_phan-0.8.5.bats ├── test_cloudflare_phan-0.8.6.bats ├── test_cloudflare_phan-0.9.0.bats ├── test_cloudflare_phan-0.9.1.bats ├── test_cloudflare_phan-0.9.2.bats ├── test_cloudflare_phan-0.9.3.bats ├── test_cloudflare_phan-0.9.4.bats └── test_cloudflare_phan-edge.bats └── versions ├── 0.8.0 ├── Dockerfile └── options ├── 0.8.1 ├── Dockerfile └── options ├── 0.8.2 ├── Dockerfile └── options ├── 0.8.3 ├── Dockerfile └── options ├── 0.8.4 ├── Dockerfile └── options ├── 0.8.5 ├── Dockerfile └── options ├── 0.8.6 ├── Dockerfile └── options ├── 0.9.0 ├── Dockerfile └── options ├── 0.9.1 ├── Dockerfile └── options ├── 0.9.2 ├── Dockerfile └── options ├── 0.9.3 ├── Dockerfile └── options ├── 0.9.4 ├── Dockerfile └── options └── edge ├── Dockerfile └── options /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- 1 | 2 | on: 3 | pull_request: {} 4 | workflow_dispatch: {} 5 | push: 6 | branches: 7 | - main 8 | - master 9 | schedule: 10 | - cron: '0 0 * * *' 11 | name: Semgrep config 12 | jobs: 13 | semgrep: 14 | name: semgrep/ci 15 | runs-on: ubuntu-20.04 16 | env: 17 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} 18 | SEMGREP_URL: https://cloudflare.semgrep.dev 19 | SEMGREP_APP_URL: https://cloudflare.semgrep.dev 20 | SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version 21 | container: 22 | image: returntocorp/semgrep 23 | steps: 24 | - uses: actions/checkout@v3 25 | - run: semgrep ci 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /images 2 | /versions/**/rootfs.tar.gz 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | sudo: required 3 | services: 4 | - docker 5 | 6 | env: 7 | - VERSION=0.8.0 8 | - VERSION=0.8.1 9 | - VERSION=0.8.2 10 | - VERSION=0.8.3 11 | - VERSION=0.8.4 12 | - VERSION=0.8.5 13 | - VERSION=0.8.6 14 | - VERSION=0.9.0 15 | - VERSION=0.9.1 16 | - VERSION=0.9.2 17 | - VERSION=0.9.3 18 | - VERSION=0.9.4 19 | - VERSION=edge 20 | matrix: 21 | exclude: 22 | - evn: VERSION=0.8.0 TRAVIS_EVENT_TYPE=cron 23 | - evn: VERSION=0.8.1 TRAVIS_EVENT_TYPE=cron 24 | - evn: VERSION=0.8.2 TRAVIS_EVENT_TYPE=cron 25 | - evn: VERSION=0.8.3 TRAVIS_EVENT_TYPE=cron 26 | - evn: VERSION=0.8.4 TRAVIS_EVENT_TYPE=cron 27 | - evn: VERSION=0.8.5 TRAVIS_EVENT_TYPE=cron 28 | - evn: VERSION=0.8.6 TRAVIS_EVENT_TYPE=cron 29 | - evn: VERSION=0.9.0 TRAVIS_EVENT_TYPE=cron 30 | - evn: VERSION=0.9.1 TRAVIS_EVENT_TYPE=cron 31 | - evn: VERSION=0.9.2 TRAVIS_EVENT_TYPE=cron 32 | - evn: VERSION=0.9.3 TRAVIS_EVENT_TYPE=cron 33 | - evn: VERSION=0.9.4 TRAVIS_EVENT_TYPE=cron 34 | allow_failures: 35 | - env: VERSION=edge 36 | 37 | script: 38 | - ./build versions/$VERSION/options 39 | - ./build test versions/$VERSION/options 40 | 41 | deploy: 42 | - provider: script 43 | script: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && ./build push versions/$VERSION/options 44 | on: 45 | branch: master 46 | -------------------------------------------------------------------------------- /BUILD.md: -------------------------------------------------------------------------------- 1 | # Building and Testing 2 | 3 | A convenience `build` script is included that has the ability to build the Phan 4 | images and run basic tests against the resulting image tags. This script is 5 | created to (eventually) be used by continuous integration, but you can run the 6 | script locally to build your own images. Be sure to check out the environment 7 | variables that can be tweaked at the top of the script file. 8 | 9 | ## Image 10 | 11 | ### Builder 12 | 13 | The Phan images are built using a builder Docker container based on the `alpine` 14 | image. This builder image lives in the `builder` sub-directory of the project 15 | and uses a `mkimage-phan.bash` script to generate a `rootfs.tar.gz` file that is 16 | layered over a new Alpine Linux container. 17 | 18 | ### Options 19 | 20 | The build script takes a glob of `options` files as an argument. Each of these 21 | files lives in a folder that describes the version of Phan to be built. Each 22 | line of the `options` file are the options that will be applied to the resulting 23 | image. By default, we use the glob `versions/**/options`. 24 | 25 | ### Example 26 | 27 | To build all the images simply run: 28 | 29 | ```sh 30 | ./build 31 | ``` 32 | 33 | Pass version files to the `build` script to build specific versions: 34 | 35 | ```sh 36 | ./build versions/edge/options 37 | ``` 38 | 39 | With `parallel` available you can speed up building a bit: 40 | 41 | ```sh 42 | parallel -m ./build ::: versions/**/options 43 | ``` 44 | 45 | ## Testing 46 | 47 | The test for images is very simple, as Phan already runs their own comprensive 48 | test suite. We test that the arguments are passed through to `phan` inside the 49 | container, that Phan is operating in the expected location (and that file are 50 | linked into the container correctly), and that lines from stdout are printed. 51 | 52 | Use the `test` sub-command of the `build` utility to run tests on currently 53 | built images. 54 | 55 | ### Example 56 | 57 | Run tests for a single image: 58 | 59 | ```sh 60 | ./build test versions/edge/options 61 | ``` 62 | 63 | Run all tests: 64 | 65 | ```sh 66 | ./build test 67 | ``` 68 | 69 | Run tests in parallel with the `parallel` utility 70 | 71 | ```sh 72 | parallel ./build test ::: versions/**/options 73 | ``` 74 | 75 | ## Pushing 76 | 77 | The `build` script also has the capability to push built images to the Docker 78 | registry, but it hasn’t yet been tested. 79 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | 3 | COPY ./docker-entrypoint.sh / 4 | ADD ./rootfs.tar.gz / 5 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Glider Labs, LLC 2 | Copyright (c) 2016, CloudFlare 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-phan 2 | 3 | An installation of PHP7 and [Phan][phan] in a super tiny [Alpine Linux][alpine] 4 | Docker image. The image is just 17 MB and runs interactively on the files 5 | outside your container, making it easy to statically analyze PHP code. 6 | 7 | ## Motivations 8 | 9 | Phan requires PHP7 and specific PHP extensions to be installed. PHP7 isn’t 10 | packaged yet for many Linux distributions and users would still need to compile 11 | and enable the extra PHP extensions. 12 | 13 | By packaging Phan inside a Docker image, we can separate the runtime and 14 | configuration of the tool from your application’s environment and requirements. 15 | 16 | ## Getting docker-phan 17 | 18 | The easiest way to use `docker-phan` is to create a shell function for “phan” 19 | that makes makes it nearly transparent that phan is running inside Docker. 20 | 21 | ```sh 22 | phan() { docker run -v $PWD:/mnt/src --rm -u "$(id -u):$(id -g)" cloudflare/phan:latest $@; return $?; } 23 | ``` 24 | 25 | (You may replace “latest” with a tagged Phan release to use a specific version 26 | of Phan.) 27 | 28 | ## Running docker-phan 29 | > If you’re just getting started with Phan, you should follow Phan’s excellent 30 | [Tutorial for Analyzing A Large Sloopy Code Base][phan-tutorial] to setup the 31 | initial configuration for your project. 32 | 33 | All of Phan’s command line flags can be passed to `docker-phan`. 34 | 35 | ## Example 36 | 37 | To create an “analysis.txt” in the current directory for farther processing 38 | 39 | ``` sh 40 | phan -po analysis.txt 41 | ``` 42 | 43 | ## Building 44 | 45 | Docker images are built with the `build` script based on the awesome building 46 | and testing framework put into place by the [`docker-alpine`][docker-alpine] 47 | contributors. See [BUILD.md][build-docs] for more information. 48 | 49 | ## License 50 | 51 | [BSD 2-Clause License][bsd-2-clause] 52 | 53 | [phan]: https://github.com/phan/phan 54 | [alpine]: http://www.alpinelinux.org/ 55 | [phan-tutorial]: https://github.com/etsy/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base 56 | [docker-alpine]: https://github.com/gliderlabs/docker-alpine 57 | [build-docs]: BUILD.md 58 | [bsd-2-clause]: https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)#summary 59 | -------------------------------------------------------------------------------- /build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | build() { 4 | declare build_files="${*:-versions/**/options}" 5 | 6 | [[ "$BUILDER_IMAGE" ]] || { 7 | BUILDER_IMAGE="phan-builder" 8 | docker build -t "$BUILDER_IMAGE" builder 9 | } 10 | 11 | for file in $build_files; do 12 | ( 13 | source "$file" 14 | local version_dir 15 | version_dir="$(dirname "$file")" 16 | : "${TAGS:?}" "${BUILD_OPTIONS:?}" "${RELEASE:?}" 17 | docker run -e "TRACE=$TRACE" --rm "$BUILDER_IMAGE" "${BUILD_OPTIONS[@]}" \ 18 | > "$version_dir/rootfs.tar.gz" 19 | 20 | for tag in "${TAGS[@]}"; do 21 | docker build -t "$tag" "$version_dir" 22 | done 23 | ) 24 | done 25 | } 26 | 27 | push() { 28 | declare build_files="${*:-versions/**/options}" 29 | for file in $build_files; do 30 | ( 31 | source "$file" 32 | for tag in "${TAGS[@]}"; do 33 | if docker history "$tag" &> /dev/null; then 34 | docker push "$tag" 35 | fi 36 | done 37 | exit 0 38 | ) 39 | done 40 | } 41 | 42 | run_tests() { 43 | declare build_files="${*:-versions/**/options}" 44 | declare -a test_files 45 | for file in $build_files; do 46 | source "$file" 47 | local tag 48 | tag="${TAGS[0]}" tag="${tag//:/-}" tag="${tag//\//_}" 49 | test_files+=("test/test_${tag}.bats") 50 | done 51 | bats "${test_files[@]}" 52 | } 53 | 54 | new_version() { 55 | declare version=$1 56 | declare ast=${2:-0.1.5} 57 | declare template_files="${3:-templates/}" 58 | 59 | mkdir -p "versions/${version}" 60 | for file in $template_files/versions/*; do 61 | ( 62 | sed "s:{{.VERSION}}:${version}:g;s:{{.AST}}:${ast}:g"<"$file">"versions/${version}/$(basename "$file")" 63 | ) 64 | done 65 | 66 | sed "s:{{.VERSION}}:${version}:g"<"templates/test/test_cloudflare_phan.bats">"test/test_cloudflare_phan-${version}.bats" 67 | } 68 | 69 | main() { 70 | set -eo pipefail; [[ "$TRACE" ]] && set -x 71 | declare cmd="$1" 72 | case "$cmd" in 73 | test) shift; run_tests "$@";; 74 | push) shift; push "$@";; 75 | version) shift; new_version "$@";; 76 | *) build "$@";; 77 | esac 78 | } 79 | 80 | main "$@" 81 | -------------------------------------------------------------------------------- /builder/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | COPY scripts/mkimage-phan.bash / 3 | COPY scripts/docker-entrypoint.sh / 4 | RUN apk --no-cache add bash 5 | RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ tini 6 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/mkimage-phan.bash"] 7 | -------------------------------------------------------------------------------- /builder/README.md: -------------------------------------------------------------------------------- 1 | # Docker Phan rootfs Builder 2 | 3 | This builder image constructs a `rootfs.tar.gz` that is applied on a base Alpine 4 | Linux image to build Phan images. The `mkimage-phan.bash` script does all 5 | of the heavy lifting. During the configuration of the image the entrypoint is 6 | added to the image. 7 | 8 | ## Options 9 | 10 | The builder takes several options: 11 | 12 | * `-r `: The phan release tag to use (such `0.2`) or the special 13 | `edge` to build the tip of master. 14 | * `-m `: The Alpine Linux mirror base. Defaults to 15 | `http://nl.alpinelinux.org/alpine`. 16 | * `-s`: Outputs the `rootfs.tar.gz` to stdout. 17 | -------------------------------------------------------------------------------- /builder/scripts/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd /mnt/src 3 | exec php7 /opt/phan/phan "$@" 4 | -------------------------------------------------------------------------------- /builder/scripts/mkimage-phan.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This mkimage-phan.bash is a modified version from 4 | # https://github.com/gliderlabs/docker-alpine/blob/master/builder/scripts/mkimage-alpine.bash. 5 | 6 | declare REL="${REL:-edge}" 7 | declare MIRROR="${MIRROR:-http://nl.alpinelinux.org/alpine}" 8 | declare AST="${AST:-0.1.5}" 9 | 10 | set -eo pipefail; [[ "$TRACE" ]] && set -x 11 | 12 | build() { 13 | declare mirror="$1" rel="$2" ast="$3" 14 | 15 | # configure rootfs 16 | local rootfs 17 | rootfs="$(mktemp -d "${TMPDIR:-/var/tmp}/docker-phan-rootfs-XXXXXXXXXX")" 18 | mkdir -p "$rootfs/etc/apk/" 19 | 20 | # configure apk mirror 21 | { 22 | echo "$mirror/edge/main" 23 | echo "$mirror/edge/community" 24 | } | tee "/etc/apk/repositories" "$rootfs/etc/apk/repositories" >&2 25 | 26 | # install PHP7 dependencies and build dependencies 27 | { 28 | apk --no-cache add php7 php7-json php7-sqlite3 php7-mbstring git build-base autoconf curl php7-dev php7-openssl php7-phar php7-dom 29 | } >&2 30 | 31 | 32 | # install composer 33 | { 34 | cd /tmp 35 | curl -O https://getcomposer.org/download/1.5.1/composer.phar 36 | printf "2745e7b8cced2e97f84b9e9cb0f9c401702f47cecea5a67f095ac4fa1a44fb80 composer.phar" | sha256sum -c 37 | mv composer.phar /usr/local/bin 38 | } >&2 39 | 40 | # install runtime dependencies into rootfs 41 | { 42 | apk --no-cache --root "$rootfs" --keys-dir /etc/apk/keys add --initdb php7 php7-json php7-sqlite3 php7-mbstring php7-pcntl php7-dom tini 43 | cp /docker-entrypoint.sh "$rootfs"/docker-entrypoint.sh 44 | } >&2 45 | 46 | # install phan 47 | mkdir -p "$rootfs/opt/" 48 | { 49 | cd "$rootfs/opt/" 50 | if [[ "$rel" == "edge" ]]; then 51 | git clone --single-branch --depth 1 https://github.com/phan/phan.git 52 | else 53 | git clone -b $rel --single-branch --depth 1 https://github.com/phan/phan.git 54 | fi 55 | cd phan 56 | 57 | php7 /usr/local/bin/composer.phar --prefer-dist --no-dev --ignore-platform-reqs --no-interaction install 58 | rm -rf .git 59 | } >&2 60 | 61 | # install php-ast 62 | { 63 | cd /tmp 64 | git clone -b "v${ast}" --single-branch --depth 1 https://github.com/nikic/php-ast.git 65 | cd php-ast 66 | phpize7 67 | ./configure --with-php-config=php-config7 68 | make INSTALL_ROOT="$rootfs" install 69 | 70 | printf "extension=ast.so" >> "$rootfs"/etc/php7/php.ini 71 | } >&2 72 | 73 | 74 | tar -z -f rootfs.tar.gz --numeric-owner -C "$rootfs" -c . 75 | [[ "$STDOUT" ]] && cat rootfs.tar.gz 76 | 77 | return 0 78 | } 79 | 80 | main() { 81 | while getopts "a:r:m:s" opt; do 82 | case $opt in 83 | r) REL="$OPTARG";; 84 | a) AST="$OPTARG";; 85 | m) MIRROR="$OPTARG";; 86 | s) STDOUT=1;; 87 | esac 88 | done 89 | 90 | build "$MIRROR" "$REL" "$AST" 91 | } 92 | 93 | main "$@" 94 | -------------------------------------------------------------------------------- /templates/test/test_cloudflare_phan.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | VERSION={{.VERSION}} 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /templates/versions/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /templates/versions/options: -------------------------------------------------------------------------------- 1 | export RELEASE="{{.VERSION}}" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="{{.AST}}" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:{{.VERSION}}) 6 | -------------------------------------------------------------------------------- /test/fixtures/fail/undefined_class.php: -------------------------------------------------------------------------------- 1 | type = Stub::TYPE_STRING; 5 | ?> -------------------------------------------------------------------------------- /test/fixtures/pass/pass.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.0.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.0 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.1.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.1 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.2.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.2 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.3.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.3 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.4.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.4 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.5.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.5 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.8.6.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.8.6 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.9.0.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.9.0 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.9.1.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.9.1 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 1 ] 9 | [ "${lines[1]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.9.2.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.9.2 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.9.3.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.9.3 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-0.9.4.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=0.9.4 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 10 | } 11 | 12 | @test "outputs zero lines if source has no issues" { 13 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 14 | -l . 15 | [ $status -eq 0 ] 16 | [ ${#lines[@]} -eq 0 ] 17 | } 18 | 19 | @test "outputs lines if source has issues" { 20 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 21 | -l . 22 | 23 | # even if there's failures, phan reports 1 24 | [ $status -eq 1 ] 25 | 26 | [ ${#lines[@]} -eq 2 ] 27 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 28 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 29 | } 30 | 31 | @test "checkstyle output format is available" { 32 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 33 | --output-mode checkstyle -l . 34 | [ $status -eq 0 ] 35 | [ ${#lines[@]} -eq 2 ] 36 | } 37 | -------------------------------------------------------------------------------- /test/test_cloudflare_phan-edge.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | export VERSION=edge 3 | docker history "cloudflare/phan:${VERSION}" >/dev/null 2>&1 4 | } 5 | 6 | @test "pass arguments to phan" { 7 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" -h 8 | [ $status -eq 0 ] 9 | echo $status 10 | [ "${lines[0]}" = "Usage: /opt/phan/phan [options] [files...]" ] 11 | } 12 | 13 | @test "outputs zero lines if source has no issues" { 14 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 15 | -l . 16 | [ $status -eq 0 ] 17 | [ ${#lines[@]} -eq 0 ] 18 | } 19 | 20 | @test "outputs lines if source has issues" { 21 | run docker run -v $PWD/test/fixtures/fail:/mnt/src "cloudflare/phan:${VERSION}" \ 22 | -l . 23 | 24 | # even if there's failures, phan reports 1 25 | [ $status -eq 1 ] 26 | 27 | [ ${#lines[@]} -eq 2 ] 28 | [ "${lines[0]}" = "./undefined_class.php:3 PhanUndeclaredClassMethod Call to method __construct from undeclared class \Stub" ] 29 | [ "${lines[1]}" = "./undefined_class.php:4 PhanUndeclaredClassConstant Reference to constant TYPE_STRING from undeclared class \Stub" ] 30 | } 31 | 32 | @test "checkstyle output format is available" { 33 | run docker run -v $PWD/test/fixtures/pass:/mnt/src "cloudflare/phan:${VERSION}" \ 34 | --output-mode checkstyle -l . 35 | [ $status -eq 0 ] 36 | [ ${#lines[@]} -eq 2 ] 37 | } 38 | -------------------------------------------------------------------------------- /versions/0.8.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.0/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.0" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.0) 6 | -------------------------------------------------------------------------------- /versions/0.8.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.1/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.1" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.1) 6 | -------------------------------------------------------------------------------- /versions/0.8.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.2/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.2" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.2) 6 | -------------------------------------------------------------------------------- /versions/0.8.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.3/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.3" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.3) 6 | -------------------------------------------------------------------------------- /versions/0.8.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.4/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.4" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.4) 6 | -------------------------------------------------------------------------------- /versions/0.8.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.5/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.5" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.5) 6 | -------------------------------------------------------------------------------- /versions/0.8.6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.8.6/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.8.6" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.8.6 cloudflare/phan:0.8) 6 | -------------------------------------------------------------------------------- /versions/0.9.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.9.0/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.9.0" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.9.0) 6 | -------------------------------------------------------------------------------- /versions/0.9.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.9.1/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.9.1" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.4" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.9.1) 6 | -------------------------------------------------------------------------------- /versions/0.9.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.9.2/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.9.2" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.5" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.9.2) 6 | -------------------------------------------------------------------------------- /versions/0.9.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.9.3/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.9.3" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.5" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.9.3) 6 | -------------------------------------------------------------------------------- /versions/0.9.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/0.9.4/options: -------------------------------------------------------------------------------- 1 | export RELEASE="0.9.4" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export AST="0.1.5" 4 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR -a $AST) 5 | export TAGS=(cloudflare/phan:0.9.4 cloudflare/phan:0.9 cloudflare/phan:latest) 6 | -------------------------------------------------------------------------------- /versions/edge/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | ADD rootfs.tar.gz / 3 | ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] 4 | -------------------------------------------------------------------------------- /versions/edge/options: -------------------------------------------------------------------------------- 1 | export RELEASE="edge" 2 | export MIRROR="http://mirror.sfo12.us.leaseweb.net/alpine" 3 | export BUILD_OPTIONS=(-s -r $RELEASE -m $MIRROR) 4 | export TAGS=(cloudflare/phan:edge) 5 | --------------------------------------------------------------------------------