Skip to content

Commit

Permalink
Fix nokogiri failed on arm64.
Browse files Browse the repository at this point in the history
Uninstall nokogiri 1.16.x because of error "cannot load such file"
asciidoctor/docker-asciidoctor#430
  • Loading branch information
barthel committed Jun 7, 2024
1 parent b632858 commit 7d708cf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
37 changes: 35 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,25 @@ workflows:
context:
- "github"
- "Docker Hub"
- example-build:
- test:
requires:
- build
matrix:
parameters:
platform:
- linux/amd64
- linux/arm64
context:
- "github"
- "Docker Hub"
- example-build:
requires:
- test
context:
- "github"
- "Docker Hub"
- example-deploy:
requires:
- build
- example-build
context:
- "github"
Expand Down Expand Up @@ -50,6 +60,7 @@ jobs:
build:
machine:
image: ubuntu-2204:2023.02.1
resource_class: large
steps:
- setup
- checkout
Expand All @@ -74,9 +85,31 @@ jobs:
--no-cache \
--progress=plain \
--push .
test:
parameters:
platform:
type: enum
enum: ["linux/amd64", "linux/arm64"]
machine:
image: ubuntu-2204:2023.02.1
resource_class: medium
steps:
- run:
name: Test docker image (<< parameters.platform >>)
no_output_timeout: 1h
command: |
echo "${DOCKER_PASS}" | docker login -u "${DOCKER_USER}" --password-stdin
docker pull ${DOCKER_USER}/asciidoctor:${CIRCLE_TAG:-latest}
docker run --rm \
-v $(pwd)/src/doc:/documents/ \
-v $(pwd)/.examples/dist:/dist \
--platform << parameters.platform >> \
${DOCKER_USER}/asciidoctor:${CIRCLE_TAG:-latest} \
inliner --help
example-build:
machine:
image: ubuntu-2204:2023.02.1
resource_class: large
steps:
- checkout
- run:
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,22 @@ RUN apk --no-cache add \
# 'Ruby' packages
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Install barby - @see: https://github.com/toretore/barby
# (Re)Install nogokiri - @see: https://nokogiri.org/tutorials/installing_nokogiri.html#other-installation-scenarios
# Install asciidoctor-multipage - @see: https://github.com/owenh000/asciidoctor-multipage
# Install asciidoctor-lists - @see: https://github.com/Alwinator/asciidoctor-lists
RUN apk add --no-cache --virtual .rubymakedepends \
build-base \
libxml2-dev \
libxslt-dev \
ruby-dev \
&& gem install --no-document \
barby rqrcode chunky_png \
asciidoctor-multipage \
asciidoctor-lists \
&& apk del -r --no-cache .rubymakedepends
&& apk del -r --no-cache .rubymakedepends \
# @see: https://github.com/asciidoctor/docker-asciidoctor/issues/430
# @see: https://github.com/asciidoctor/docker-asciidoctor/blob/d16e85e04c46ed02414565aa26b67a809f4c64c1/Dockerfile#L139
&& if [[ ${TARGETARCH} == arm64 ]]; then gem uninstall nokogiri -v '> 1.14'; fi

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 'Python' packages
Expand Down

0 comments on commit 7d708cf

Please sign in to comment.