Zenika / alpine-chrome

Chrome Headless docker images built upon alpine official image
https://hub.docker.com/r/zenika/alpine-chrome
Apache License 2.0
1.83k stars 243 forks source link

Cannot install stable alpine packages in :latest #48

Closed jketterl closed 4 years ago

jketterl commented 4 years ago

Describe the bug We are currently unable to build our cucumber test images since 3227d27e54cc0299093dd79883449eb4e9f628f7 overwrites the alpine 3.10 repositories from the build, leaving only edge behind. While this may be necessary (not sure if it is) for the installation of chromium, I think it would be good practice to restore the original configuration afterwards.

There's also some feedback on the commit, requesting to open a ticket. I couldn't find one, so here it is.

To Reproduce Steps to reproduce the behavior:

  1. zenika/alpine-chrome@sha256:e436385b09839d8f6cd69f3a13a5decd74ea7e2e64a832129c27dc2ac9e64e71
  2. Build custom image based on FROM zenika/alpine-chrome:latest
  3. Attempt to install packages, e.g. RUN apk add bash
Step 3/10 : RUN apk add bash
 ---> Running in 5b44d631b561
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  readline-8.0.1-r0:
    masked in: @edge
    satisfies: bash-5.0.11-r0[so:libreadline.so.8]
  bash-5.0.11-r0:
    masked in: @edge
    satisfies: world[bash]
The command '/bin/sh -c apk add bash' returned a non-zero code: 2

Fails due to the unavailability of apk "normal" repositories; Only bash@edge would be supported.

What is the expected behavior? We'd like to be able to install packages from stable alpine again, without being forced to use (potentially unstable) edge versions.

What is the actual behavior? See error above

Possible solution Ideas:

Versions

Software Version(s)
Chromium Chromium 77.0.3865.75
Image zenika/alpine-chrome@sha256:e436385b09839d8f6cd69f3a13a5decd74ea7e2e64a832129c27dc2ac9e64e71
Docker Engine 18.018.09

Additional Context Since this also affects :77, this leaves us completely unable to use the image altogether. Alpine has removed older versions of the chromedriver from their 3.10 repositories, leaving version 77 as only option. That, in turns, only supports chromium 77 and above, which means the :76 tag will not work for us, either.

jlandure commented 4 years ago

Hi @jketterl 👋

Sorry for the delay. I was busy organizing a quite big conference called DevFest Nantes

I will take time to think about edge vs main problems 👌 In the meantime, could you use a tagged version? How can I help? Do you have a proposal to solve the chromedriver problem with 76?

jketterl commented 4 years ago

Hi @jlandure :smiley: thank you for your reply.

Don't worry about the delay, we've all been here, and I must say that from my perspective, it was still pretty fast.

For a workaround, I have added a step to our Dockerfile that simply adds the alpine stable URLs back. This results in a list of downgrades, of course, but to my surprise, it works. I guess we're lucky that chrome 77 is in stable by now.

As an idea for the older tags: Since you do offer builds with node and puppeteer, would it be possible to have e.g. alpine-chrome:with-chromedriver? That way, chrome and chromedriver would be kept in matching versions in an image, losing the need to use apk at a later point.

jlandure commented 4 years ago

Hi @jketterl 👋 In a recent update, I no longer used @edge. I think apk add bash command will be fine.

Do you still need a with-chromedriver version? Are you interested to contribute to this project to bring this new tag alive?

jlandure commented 4 years ago

Hi @jketterl Thanks again for the suggestion 👍

Do you have any news about your suggestion on how to do it?

As an idea for the older tags: Since you do offer builds with node and puppeteer, would it be possible to have e.g. alpine-chrome:with-chromedriver? That way, chrome and chromedriver would be kept in matching versions in an image, losing the need to use apk at a later point.

jlandure commented 4 years ago

@all-contributors please add @jketterl for bug

allcontributors[bot] commented 4 years ago

@jlandure

I've put up a pull request to add @jketterl! :tada:

jlandure commented 4 years ago

Hi @jketterl 👋

Do you have any news for me? ✏️ The apk add bash command is fine, isn't it? 👌 Do you still need a with-chromedriver version? 🤔

jlandure commented 4 years ago

With no news from your part @jketterl I've decided to close this issue. Feel free to re-open it if you need some info.