How can we install google-chrome-stable on alpine image in dockerfile using dpkg?

后端 未结 1 1643
日久生厌
日久生厌 2021-02-14 09:48

I am trying to install google-chrome-stable on alpine image using dpkg. However, the dpkg is installed but it does not install google-chrome-stable and return this error instead

1条回答
  •  灰色年华
    2021-02-14 10:13

    Installing the Chrome .deb file this way won't work on Alpine.

    While the dpkg package is available in the Alpine repository, and is useful for installing lightweight Debian packages, you won't be able to use it for installing complex Debian packages, since it'll be impossible to satisfy many Debian dependencies. Alpine is generally not Debian compatible (relying on musl libc), so installing native Alpine packages using apk is the right way to go.

    AFAIK, there's currently no Google Chrome Alpine Linux compatible, musl-libc build.

    You could, however, install the Chromium browser, which is available using an apk package:

    apk add chromium

    Another option is enabling glibc on a vanilla Alpine image, making it compatible with Debian binaries. This is a fairly simple procedure, see: Dockerfile. However, it may not be suitable for images with existing applications such as ruby:2.6.3-alpine3.10. Moreover, even with a glibc setup on Alpine, Chrome is not likely to run without issues. I have made a quick attempt (Dockerfile) but couldn't get past the first segfault.

    0 讨论(0)
提交回复
热议问题