diff --git a/php/.gitlab-ci.yml b/php/.gitlab-ci.yml index afb247d..64c139a 100644 --- a/php/.gitlab-ci.yml +++ b/php/.gitlab-ci.yml @@ -13,4 +13,14 @@ build_php82: <<: *build_template variables: - PHP_VERSION: "82" \ No newline at end of file + PHP_VERSION: "82" + +build_php80: + <<: *build_template + variables: + PHP_VERSION: "80" + +build_php74: + <<: *build_template + variables: + PHP_VERSION: "74" \ No newline at end of file diff --git a/php/Dockerfile.php74 b/php/Dockerfile.php74 new file mode 100644 index 0000000..b9b5236 --- /dev/null +++ b/php/Dockerfile.php74 @@ -0,0 +1,39 @@ +FROM registry.bobert.me/anthorob/coder-images:base + +USER root + +RUN apt-get update && \ + add-apt-repository ppa:ondrej/php && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + php7.4 \ + php7.4-cli \ + php7.4-common \ + php7.4-curl \ + php7.4-mbstring \ + php7.4-mysql \ + php7.4-xml \ + php7.4-zip \ + php7.4-bcmath \ + php7.4-soap \ + php7.4-readline \ + php7.4-intl \ + php7.4-opcache \ + php7.4-gd \ + php7.4-pgsql \ + php7.4-sqlite3 \ + php7.4-tokenizer \ + php7.4-fileinfo && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN update-alternatives --install /usr/bin/php php /usr/bin/php7.4 74 && \ + update-alternatives --set php /usr/bin/php7.4 + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +ENV NVM_DIR=/home/coder/.nvm +RUN mkdir -p $NVM_DIR && \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash + +USER coder +WORKDIR /home/coder diff --git a/php/Dockerfile.php80 b/php/Dockerfile.php80 new file mode 100644 index 0000000..acda138 --- /dev/null +++ b/php/Dockerfile.php80 @@ -0,0 +1,39 @@ +FROM registry.bobert.me/anthorob/coder-images:base + +USER root + +RUN apt-get update && \ + add-apt-repository ppa:ondrej/php && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + php8.0 \ + php8.0-cli \ + php8.0-common \ + php8.0-curl \ + php8.0-mbstring \ + php8.0-mysql \ + php8.0-xml \ + php8.0-zip \ + php8.0-bcmath \ + php8.0-soap \ + php8.0-readline \ + php8.0-intl \ + php8.0-opcache \ + php8.0-gd \ + php8.0-pgsql \ + php8.0-sqlite3 \ + php8.0-tokenizer \ + php8.0-fileinfo && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN update-alternatives --install /usr/bin/php php /usr/bin/php8.0 80 && \ + update-alternatives --set php /usr/bin/php8.0 + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +ENV NVM_DIR=/home/coder/.nvm +RUN mkdir -p $NVM_DIR && \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash + +USER coder +WORKDIR /home/coder