mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 20:52:14 +01:00
fix(armhf): add an earlier version of Chromium (#717)
This commit is contained in:
24
.github/workflows/continuous_integration.yml
vendored
24
.github/workflows/continuous_integration.yml
vendored
@@ -69,27 +69,3 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make release GOTENBERG_VERSION=edge
|
make release GOTENBERG_VERSION=edge
|
||||||
make release GOTENBERG_VERSION=edge DOCKER_REPOSITORY=thecodingmachine
|
make release GOTENBERG_VERSION=edge DOCKER_REPOSITORY=thecodingmachine
|
||||||
|
|
||||||
# FIXME: temporary job for checking if armhf build is working thanks to an upstream fix.
|
|
||||||
armhf_build:
|
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
continue-on-error: true
|
|
||||||
needs:
|
|
||||||
- Tests
|
|
||||||
name: armhf build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Checkout source code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Log in to Docker Hub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- name: Build try of armhf Docker image variant
|
|
||||||
run: |
|
|
||||||
make release GOTENBERG_VERSION=armhf
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ ARG GOTENBERG_USER_GID
|
|||||||
ARG GOTENBERG_USER_UID
|
ARG GOTENBERG_USER_UID
|
||||||
ARG NOTO_COLOR_EMOJI_VERSION
|
ARG NOTO_COLOR_EMOJI_VERSION
|
||||||
ARG PDFTK_VERSION
|
ARG PDFTK_VERSION
|
||||||
|
ARG TMP_CHOMIUM_VERSION_ARMHF="116.0.5845.180-1~deb12u1"
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Gotenberg" \
|
LABEL org.opencontainers.image.title="Gotenberg" \
|
||||||
org.opencontainers.image.description="A Docker-powered stateless API for PDF files." \
|
org.opencontainers.image.description="A Docker-powered stateless API for PDF files." \
|
||||||
@@ -120,6 +121,9 @@ RUN \
|
|||||||
# Install either Google Chrome stable on amd64 architecture or
|
# Install either Google Chrome stable on amd64 architecture or
|
||||||
# Chromium on other architectures.
|
# Chromium on other architectures.
|
||||||
# See https://github.com/gotenberg/gotenberg/issues/328.
|
# See https://github.com/gotenberg/gotenberg/issues/328.
|
||||||
|
# FIXME:
|
||||||
|
# armhf is currently not working with the latest version of Chromium.
|
||||||
|
# See: https://github.com/gotenberg/gotenberg/issues/709.
|
||||||
/bin/bash -c \
|
/bin/bash -c \
|
||||||
'set -e &&\
|
'set -e &&\
|
||||||
if [[ "$(dpkg --print-architecture)" == "amd64" ]]; then \
|
if [[ "$(dpkg --print-architecture)" == "amd64" ]]; then \
|
||||||
@@ -128,6 +132,9 @@ RUN \
|
|||||||
apt-get update -qq &&\
|
apt-get update -qq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends --allow-unauthenticated google-chrome-stable &&\
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends --allow-unauthenticated google-chrome-stable &&\
|
||||||
mv /usr/bin/google-chrome-stable /usr/bin/chromium; \
|
mv /usr/bin/google-chrome-stable /usr/bin/chromium; \
|
||||||
|
elif [[ "$(dpkg --print-architecture)" == "armhf" ]]; then \
|
||||||
|
apt-get update -qq &&\
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends chromium-common="$TMP_CHOMIUM_VERSION_ARMHF" chromium="$TMP_CHOMIUM_VERSION_ARMHF"; \
|
||||||
else \
|
else \
|
||||||
apt-get update -qq &&\
|
apt-get update -qq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends chromium; \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends chromium; \
|
||||||
|
|||||||
@@ -10,25 +10,6 @@ NOTO_COLOR_EMOJI_VERSION="$5"
|
|||||||
PDFTK_VERSION="$6"
|
PDFTK_VERSION="$6"
|
||||||
DOCKER_REPOSITORY="$7"
|
DOCKER_REPOSITORY="$7"
|
||||||
|
|
||||||
# FIXME: for whatever reasons, platform linux/arm/v7 (armhf) is not working
|
|
||||||
# anymore. See https://github.com/gotenberg/gotenberg/issues/709 for more
|
|
||||||
# details.
|
|
||||||
|
|
||||||
if [ "$GOTENBERG_VERSION" == "armhf" ]; then
|
|
||||||
docker buildx build \
|
|
||||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
|
||||||
--build-arg GOTENBERG_VERSION="$GOTENBERG_VERSION" \
|
|
||||||
--build-arg GOTENBERG_USER_GID="$GOTENBERG_USER_GID" \
|
|
||||||
--build-arg GOTENBERG_USER_UID="$GOTENBERG_USER_UID" \
|
|
||||||
--build-arg NOTO_COLOR_EMOJI_VERSION="$NOTO_COLOR_EMOJI_VERSION" \
|
|
||||||
--build-arg PDFTK_VERSION="$PDFTK_VERSION" \
|
|
||||||
--platform linux/arm/v7 \
|
|
||||||
-t "$DOCKER_REPOSITORY/gotenberg:armhf" \
|
|
||||||
-f build/Dockerfile .
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$GOTENBERG_VERSION" == "edge" ]; then
|
if [ "$GOTENBERG_VERSION" == "edge" ]; then
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
||||||
@@ -40,6 +21,7 @@ if [ "$GOTENBERG_VERSION" == "edge" ]; then
|
|||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
--platform linux/386 \
|
--platform linux/386 \
|
||||||
|
--platform linux/arm/v7 \
|
||||||
-t "$DOCKER_REPOSITORY/gotenberg:edge" \
|
-t "$DOCKER_REPOSITORY/gotenberg:edge" \
|
||||||
--push \
|
--push \
|
||||||
-f build/Dockerfile .
|
-f build/Dockerfile .
|
||||||
@@ -76,6 +58,7 @@ docker buildx build \
|
|||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
--platform linux/386 \
|
--platform linux/386 \
|
||||||
|
--platform linux/arm/v7 \
|
||||||
-t "$DOCKER_REPOSITORY/gotenberg:latest" \
|
-t "$DOCKER_REPOSITORY/gotenberg:latest" \
|
||||||
-t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}" \
|
-t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}" \
|
||||||
-t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}" \
|
-t "$DOCKER_REPOSITORY/gotenberg:${SEMVER[0]}.${SEMVER[1]}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user