BackstopJS: Looks like fonts or chrome is breaking the docker build

Hey @dgrebb – if you have a minute – I tried to publish backstop today but the builds kept hanging on what looked like a failure to install fonts or chrome. Was wondering if you might have some insight? Here is the output of that section…

> [linux/arm64 2/4] RUN apt-get -qq update >/dev/null && apt-get install -qq   fonts-liberation   xfonts-cyrillic   xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming   fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic   fonts-unfonts-core fonts-unfonts-extra   fonts-noto-cjk fonts-noto-color-emoji   chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*:
38.80 debconf: delaying package configuration, since apt-utils is not installed
267.1 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
Dockerfile:10
--------------------
   9 |     # install chromium and its deps
  10 | >>> RUN apt-get -qq update >/dev/null && apt-get install -qq \
  11 | >>>   fonts-liberation \
  12 | >>>   # cyrillic
  13 | >>>   xfonts-cyrillic \
  14 | >>>   # chinese
  15 | >>>   xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming \
  16 | >>>   # japanese
  17 | >>>   fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic \
  18 | >>>   # korean
  19 | >>>   fonts-unfonts-core fonts-unfonts-extra \
  20 | >>>   # cjk + emoji font
  21 | >>>   fonts-noto-cjk fonts-noto-color-emoji \
  22 | >>>   # chromium
  23 | >>>   chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*
  24 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get -qq update >/dev/null && apt-get install -qq   fonts-liberation   xfonts-cyrillic   xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming   fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic   fonts-unfonts-core fonts-unfonts-extra   fonts-noto-cjk fonts-noto-color-emoji   chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 1
  • Comments: 18 (18 by maintainers)

Most upvoted comments

@dgrebb The new Github Workflow is amazing! 6.3.14 is pushed out to npm & dockerhub! Cheers!! 🚀

@dgrebb puppeteer is bumped and a new version is pushed to npm.

So, we’re back to – building for linux/amd64 works. building for linux/arm64 barfs. I have a sinking feeling I need to run this on my kid’s M1 mac mini to test out if buildx no longer builds multiplatform on intel macs.

That is where I am. Will follow up. Thanks!

@garris as mentioned over in #1550, puppeteer needs to be bumped, and a new version of backstopjs needs to be published to npm, before we can continue…

Now that puppeteer can’t find Chrome, this is a hard-stop in any additional testing. Both backstop itself as well as Docker are impacted.

[!WARNING] Commands linked below will destroy any and all Docker containers, images, volumes, builders, and caches on the system.

What version of Docker is running? Does it need to be updated? For me:

❯ docker --version
Docker version 25.0.3, build 4debf41

Maybe try this first from project root directory, eliminating cache from the equation:

  • docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t dgrebb/downstream_backstopjs:6.3.6 docker

No? Why don’t we go ahead and ⚠️ burn Docker to the ground ⚠️.

Then try npm run build-docker, or the first command?

@garris it definitely looks like something is up with backstopbuilder.

Did you already give something like this a go?

  1. docker buildx create --name newbackstopbuilder --platform linux/amd64,linux/arm64
  2. docker buildx use newbackstopbuilder
  3. npm run build-and-publish

And see that buildx is reflecting a newly created builder?

6.3.6           
[+] Building 9.8s (6/14)              docker-container:newbackstopbuilder

I’ve successfully published from a master branch on npm and Docker Hub.

Here’s the branch diffed with master, which yielded the above, after changing the package and image names.