-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
4,061 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build php-83 docker images multi-arch | ||
|
||
on: | ||
push: | ||
branches: | ||
- multi-arch | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get branch names | ||
id: branch-name | ||
uses: tj-actions/branch-names@v5 | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
- name: login to docker hub | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
- name: create --use | ||
run: docker buildx create --use | ||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
- name: buildx ls | ||
run: docker buildx ls | ||
- name: build the branch-specific images for amd64/arm64 | ||
if: steps.branch-name.outputs.current_branch != 'master' | ||
run: ./build.sh both 83 ${{ steps.branch-name.outputs.current_branch }} | ||
- name: build the main images for amd64/arm64 | ||
if: steps.branch-name.outputs.current_branch == 'master' | ||
run: ./build.sh both 83 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG BASE_IMAGE_TAG | ||
|
||
FROM factorial/drupal-docker:$BASE_IMAGE_TAG | ||
|
||
LABEL org.opencontainers.image.authors="stephan@factorial.io" | ||
|
||
ARG NODE_VERSION=14 | ||
ENV NVM_DIR /usr/local/nvm | ||
RUN mkdir -p $NVM_DIR | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends curl gnupg ca-certificates \ | ||
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash \ | ||
&& . /$NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& nvm use default \ | ||
&& npm install -g yarn \ | ||
&& npm config delete prefix | ||
|
||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | ||
ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG BASE_IMAGE_TAG | ||
|
||
FROM factorial/drupal-docker:$BASE_IMAGE_TAG | ||
|
||
LABEL org.opencontainers.image.authors="stephan@factorial.io" | ||
|
||
RUN apt-get update && apt-get install -y wget xfonts-base xfonts-75dpi pdftk xz-utils | ||
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ | ||
&& case "${dpkgArch##*-}" in \ | ||
arm64) ARCH='arm64';; \ | ||
*) ARCH='amd64' ;; \ | ||
esac \ | ||
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_$ARCH.deb \ | ||
&& dpkg -i wkhtmltox_0.12.6-1.buster_$ARCH.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ARG BASE_IMAGE_TAG | ||
FROM factorial/drupal-docker:$BASE_IMAGE_TAG | ||
|
||
LABEL org.opencontainers.image.authors="stephan@factorial.io" | ||
|
||
RUN dpkg-divert --local --rename --add /sbin/initctl | ||
RUN ln -sf /bin/true /sbin/initctl | ||
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update --fix-missing && apt-get -y -q install php-xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# dockerized drupal development box | ||
# includes apache, php, xhprof, imagemagick, sshd and drush | ||
# No mysql, use a dedicated mysql-docker-image and link the container. | ||
# | ||
# VERSION php-83 | ||
# DOCKER-VERSION 2 | ||
FROM debian:buster | ||
LABEL org.opencontainers.image.authors="stephan@factorial.io" | ||
|
||
RUN dpkg-divert --local --rename --add /sbin/initctl | ||
RUN ln -sf /bin/true /sbin/initctl | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update --fix-missing && apt-get -y -q install git default-mysql-client wget optipng pngquant webp jpegoptim apt-transport-https lsb-release ca-certificates sqlite3 | ||
|
||
# Prepare php8.1 | ||
RUN /usr/bin/wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | ||
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update --fix-missing && apt-get -y -q install rsync unzip apache2 pwgen python3-pip vim-tiny openssh-server cron vim curl graphviz make imagemagick libapache2-mod-php8.3 php8.3-mysql php8.3-curl php8.3-memcache php8.3-redis php8.3-mbstring php8.3-zip php8.3-gd php8.3-dom php8.3-xml php8.3-bcmath php8.3-soap php8.3-sqlite3 php8.3-apcu php8.3-intl | ||
|
||
# composer and drush | ||
RUN curl -ss https://getcomposer.org/installer | php | ||
RUN mv composer.phar /usr/local/bin/composer | ||
RUN mkdir -p /.cache && chmod -R 777 /.cache | ||
RUN /usr/local/bin/composer global require "drush/drush:^10" | ||
RUN sed -i '1i export PATH="$HOME/.config/composer/vendor/bin:$PATH"' /root/.bashrc | ||
|
||
|
||
# sshd | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get autoclean | ||
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config | ||
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config | ||
RUN mkdir /var/run/sshd | ||
RUN echo 'root:root' |chpasswd | ||
|
||
# configure apache | ||
RUN sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf | ||
RUN a2enmod rewrite vhost_alias | ||
|
||
RUN pip3 install supervisor | ||
ADD ./common/start.sh /start.sh | ||
ADD ./common/foreground.sh /etc/apache2/foreground.sh | ||
ADD ./common/apache-vhost.conf /etc/apache2/sites-available/000-default.conf | ||
ADD ./common/supervisord.conf /etc/supervisord.conf | ||
ADD ./php-83/php.ini /etc/php/8.1/apache2/php.ini | ||
ADD ./php-83/php_cli.ini /etc/php/8.1/cli/php.ini | ||
ADD ./php-83/phpsendmail /usr/local/bin/phpsendmail | ||
RUN chmod +x /usr/local/bin/phpsendmail | ||
RUN touch /var/log/mail_php.log | ||
RUN chmod 777 /var/log/mail_php.log | ||
RUN touch /var/log/php_errors.log | ||
RUN chmod 777 /var/log/php_errors.log | ||
|
||
RUN chmod 755 /start.sh /etc/apache2/foreground.sh | ||
EXPOSE 80 | ||
CMD ["/bin/bash", "/start.sh"] |
Oops, something went wrong.