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 491f7c9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
31 changes: 31 additions & 0 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"
- test:
requires:
- build
matrix:
parameters:
platform:
- linux/amd64
- linux/arm64
- example-build:
requires:
- build
- test
context:
- "github"
- "Docker Hub"
- example-deploy:
requires:
- build
- test
- example-build
context:
- "github"
Expand Down Expand Up @@ -74,6 +84,27 @@ jobs:
--no-cache \
--progress=plain \
--push .
test:
parameters:
platform:
type: enum
enum: ["linux/amd64", "linux/arm64"]
machine:
image: ubuntu-2204:2023.02.1
steps:
- setup
- 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
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 491f7c9

Please sign in to comment.