Skip to content

Commit 66f28a4

Browse files
Merge pull request #868 from nextcloud/feat/32bit
2 parents 864c087 + f58cf87 commit 66f28a4

File tree

4 files changed

+43
-11
lines changed

4 files changed

+43
-11
lines changed

.github/workflows/build-test.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,18 @@ jobs:
6464
- name: Set up Docker Buildx
6565
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
6666

67-
# Only build non-client containers as multi-arch containers
68-
- name: Build multi-arch Docker image ${{ matrix.dockerfile }}
69-
if: ${{ !startsWith(matrix.dockerfile, 'client') && !startsWith(matrix.dockerfile, 'translations') }}
67+
- name: Build Docker image ${{ matrix.dockerfile }}
7068
run: |
69+
IMAGE=$(dirname ${{ matrix.dockerfile }})
7170
cd "$(dirname ${{ matrix.dockerfile }})"
72-
docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile
73-
74-
- name: Build amd64 Docker image ${{ matrix.dockerfile }}
75-
if: ${{ startsWith(matrix.dockerfile, 'client') || startsWith(matrix.dockerfile, 'translations') }}
76-
run: |
77-
cd "$(dirname ${{ matrix.dockerfile }})"
78-
docker build . --file Dockerfile
71+
case "$IMAGE" in
72+
client*)
73+
PLATFORM="linux/amd64" ;;
74+
translations*)
75+
PLATFORM="linux/amd64" ;;
76+
*32bit)
77+
PLATFORM="linux/386" ;;
78+
*)
79+
PLATFORM="linux/amd64,linux/arm64'" ;;
80+
esac
81+
docker buildx build --platform "$PLATFORM" . --file Dockerfile

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Build container image
6969
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
7070
with:
71-
platforms: ${{ (startsWith(github.event.inputs.folderPath, 'client') || startsWith(github.event.inputs.folderPath, 'translations')) && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
71+
platforms: ${{ (startsWith(github.event.inputs.folderPath, 'client') || startsWith(github.event.inputs.folderPath, 'translations')) && 'linux/amd64' || (endsWith(github.event.inputs.folderPath, '32bit') && 'linux/386' || 'linux/amd64,linux/arm64') }}
7272
push: true
7373
context: ${{ github.event.inputs.folderPath }}
7474
file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'

php8.4-32bit/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM i386/debian:stable
2+
RUN apt-get update && apt-get install -y wget apt-transport-https lsb-release ca-certificates \
3+
git curl make libmagickcore-7.q16-10-extra \
4+
php8.4-apcu php8.4-bz2 php8.4-cli php8.4-ctype php8.4-curl \
5+
php8.4-dom php8.4-fileinfo php8.4-gd php8.4-iconv \
6+
php8.4-imagick php8.4-intl php8.4-ldap php8.4-mbstring \
7+
php8.4-posix php8.4-redis php8.4-simplexml php8.4-sqlite \
8+
php8.4-sqlite3 php8.4-xdebug php8.4-xml \
9+
php8.4-xmlreader php8.4-xmlwriter php8.4-zip && \
10+
apt-get autoremove -y && apt-get autoclean && apt-get clean && \
11+
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
12+
13+
RUN phpenmod zip intl gd systemd
14+
RUN curl -O -L https://getcomposer.org/download/2.9.2/composer.phar \
15+
&& chmod +x composer.phar \
16+
&& mv composer.phar /usr/local/bin/composer
17+
18+
RUN phpdismod xdebug
19+
ADD nextcloud.ini /etc/php/8.4/cli/conf.d/nextcloud.ini

php8.4-32bit/nextcloud.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
memory_limit = 768M
2+
phar.readonly = 0 ; only for building phar files on CI - should be disabled on production environments
3+
; Opcache
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.interned_strings_buffer=8
7+
opcache.max_accelerated_files=10000
8+
opcache.memory_consumption=128
9+
opcache.save_comments=1
10+
opcache.revalidate_freq=1

0 commit comments

Comments
 (0)