Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions: Build ARM64 dev base image #1169

Merged
merged 3 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/dev-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,22 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref || 'master' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/universityradioyork/myradio/dev-base:${{ github.event.inputs.docker-tag || 'latest' }}
- name: Push
run: docker push ghcr.io/universityradioyork/myradio/dev-base:${{ github.event.inputs.docker-tag || 'latest' }}

- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/universityradioyork/myradio/dev-base:${{ github.event.inputs.docker-tag || 'latest' }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ RUN openssl req -nodes -new -subj "/C=GB/ST=North Yorkshire/L=York/O=University

RUN a2enmod rewrite ssl

# Fixes for running on ARM
RUN echo "Mutex posixsem" >> /etc/apache2/apache2.conf

COPY sample_configs/apache.conf /etc/apache2/sites-available/myradio.conf
RUN a2dissite 000-default && a2ensite myradio && \
service apache2 restart && apachectl -S
Expand Down
10 changes: 2 additions & 8 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ RUN docker-php-ext-install pgsql pdo_pgsql gd ldap curl xsl zip
RUN pecl install memcached && \
echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini

RUN pecl install xdebug-3.3.1 && docker-php-ext-enable xdebug \
&& echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so"' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo 'xdebug.client_port=9003' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo 'xdebug.mode=develop,debug' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo 'xdebug.start_with_request=yes' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo 'xdebug.client_host=localhost' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

RUN echo 'error_reporting=E_ALL' >> /usr/local/etc/php/conf.d/error-reporting.ini

RUN echo "memory_limit=512M" >> /usr/local/etc/php/conf.d/uploads.ini
Expand All @@ -40,7 +33,8 @@ RUN a2dissite 000-default && a2ensite myradio && \
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN mkdir -p /var/www/myradio && chown -R www-data:www-data /var/www/myradio && \
mkdir -p /var/log/myradio && chown -R www-data:www-data /var/log/myradio
mkdir -p /var/log/myradio && chown -R www-data:www-data /var/log/myradio && \
ln -s /var/log/myradio/errors.log /dev/stderr

WORKDIR /var/www/myradio
COPY composer.* /var/www/myradio/
Expand Down
Loading