Skip to content

Commit

Permalink
Merge pull request #6 from chhsiao1981/supporting-arm64
Browse files Browse the repository at this point in the history
Supporting arm64
  • Loading branch information
holishing authored Apr 22, 2024
2 parents 56ea892 + 6efeed9 commit 186905a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 17 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/push_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,47 @@ on:
jobs:
main:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
-
name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:latest,bbsdocker/imageptt:${{ steps.date.outputs.date }}
build-args: |
MY_DEBIAN_VERSION=bullseye
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
-
name: Build and push - arm64
id: docker_build_arm64
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:latest,bbsdocker/imageptt:${{ steps.date.outputs.date }}
platforms: linux/arm64
build-args:
- MY_DEBIAN_VERSION=bullseye
- OPENRESTY_ARCH=arm64
-
name: Image digest - arm64
run: echo ${{ steps.docker_build_arm64.outputs.digest }}
24 changes: 19 additions & 5 deletions .github/workflows/push_container_sid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ on:
jobs:
main:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
-
name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:sid,bbsdocker/imageptt:sid-latest,bbsdocker/imageptt:sid-${{ steps.date.outputs.date }}
Expand All @@ -40,3 +40,17 @@ jobs:
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
-
name: Build and push - arm64
id: docker_build_arm64
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:sid,bbsdocker/imageptt:sid-latest,bbsdocker/imageptt:sid-${{ steps.date.outputs.date }}
platforms: linux/arm64
build-args:
- MY_DEBIAN_VERSION=sid
- OPENRESTY_ARCH=arm64
-
name: Image digest - arm64
run: echo ${{ steps.docker_build_arm64.outputs.digest }}
24 changes: 19 additions & 5 deletions .github/workflows/push_container_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ on:
jobs:
main:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
-
name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:bookworm,bbsdocker/imageptt:bookworm-latest,bbsdocker/imageptt:bookworm-${{ steps.date.outputs.date }}
Expand All @@ -40,3 +40,17 @@ jobs:
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
-
name: Build and push - arm64
id: docker_build_arm64
uses: docker/build-push-action@v5
with:
push: true
tags: bbsdocker/imageptt:bookworm,bbsdocker/imageptt:bookworm-latest,bbsdocker/imageptt:bookworm-${{ steps.date.outputs.date }}
platforms: linux/arm64
build-args:
- MY_DEBIAN_VERSION=bookworm
- OPENRESTY_ARCH=arm64
-
name: Image digest - arm64
run: echo ${{ steps.docker_build_arm64.outputs.digest }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ COPY initbbs_c /tmp/initbbs.c
COPY build_ptt.sh /tmp/build_ptt.sh

ARG MY_DEBIAN_VERSION
ARG OPENRESTY_ARCH=

ENV DEBIAN_VERSION $MY_DEBIAN_VERSION
RUN set -x \
&& groupadd --gid 99 bbs \
Expand Down Expand Up @@ -38,7 +40,7 @@ RUN set -x \
libio-all-perl \
libemail-sender-perl \
&& ( curl -L https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty-archive-keyring.gpg ) \
&& ( echo "deb [signed-by=/usr/share/keyrings/openresty-archive-keyring.gpg] http://openresty.org/package/debian $(echo ${DEBIAN_VERSION}|sed 's/bookworm/bullseye/g'|sed 's/sid/bullseye/g') openresty" | tee /etc/apt/sources.list.d/openresty.list ) \
&& ( echo "deb [signed-by=/usr/share/keyrings/openresty-archive-keyring.gpg] http://openresty.org/package/${OPENRESTY_ARCH}/debian $(echo ${DEBIAN_VERSION}|sed 's/bookworm/bullseye/g'|sed 's/sid/bullseye/g') openresty" | tee /etc/apt/sources.list.d/openresty.list ) \
&& apt-get update \
&& apt-get -y install --no-install-recommends openresty \
&& cp /tmp/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf \
Expand Down

0 comments on commit 186905a

Please sign in to comment.