Build docker base image fail

AI-generated summary

The discussion revolves around a failed attempt to build a Docker base image using a Dockerfile from the discourse_docker repository, due to a missing phantomjs file. ray_chen reports the error ADD failed: stat /var/lib/docker/ tmp/docker-builder498252385/phantomjs: no such file or directory, noting that phantomjs is absent from the repository. sam clarifies that phantomjs is being phased out and will soon be removed, with tgxworld expressing surprise at the status. gerhard provides a workaround by directing users to a related meta post on Chrome headless support and mentions that Discourse releases a new base image weekly, available on Docker Hub. gerhard further explains that the build failure is due to the current need to compile phantomjs before building the image, emphasizing it’s not the user’s fault.

I tried to build image using Dockerfile from discourse_docker/image/base at master · discourse/discourse_docker · GitHub but ends up with below error.

Step 46/59 : ADD phantomjs /usr/local/bin/phantomjs
ADD failed: stat /var/lib/docker/tmp/docker-builder498252385/phantomjs: no such file or directory

I cannot find phantomjs on folder “/image/base” of [discourse_docker] repo (GitHub - discourse/discourse_docker: A Docker image for Discourse · GitHub). Can someone point me where can I find the file?

Sorry we are in the process of nuking phantom, it should be gone soon cc @tgxworld

Take a look at the following post if you don’t want to wait until phantomjs is removed.

Also, we build a new base image every week. You can find it at discourse/base - Docker Image

Hmm I didn’t nuke phantomjs yet… That is odd

I think what Sam meant to say was:

Sorry we are in the process of nuking phantomjs. It should be gone soon and then you don’t need to worry about the missing phantomjs anymore.

It’s definitely not your fault that the build is failing for @ray_chen. Building the base image is just a little bit more complicated. Currently it doesn’t work without compiling phantomjs before building the base image.