Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker images fails to build #516

Open
fqassemi opened this issue Mar 15, 2024 · 0 comments
Open

docker images fails to build #516

fqassemi opened this issue Mar 15, 2024 · 0 comments

Comments

@fqassemi
Copy link

I started building docker image on my debian version 11.9 and it failed times.

  1. It returned an error failing to download go
  2. it returned an error regarding missing browsh.xpi
  3. it returned an error failing to change /etc/hosts

The fixes are :

  1. I changed url=https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz to
    url=https://go.dev/dl/go"$version".8.linux-"$GOARCH".tar.gz

  2. I added the following commands to docker so it downloads and remove the browsh.xpi to the right directory (the lines between **):
    RUN /build/ctl.sh install_golang $BASE
    RUN wget -P "$BASE" "https://github.com/browsh-org/browsh/releases/download/v1.8.3/browsh-1.8.3.xpi"
    RUN mv "$BASE/browsh-1.8.3.xpi" "$BASE/src/browsh/browsh.xpi"

    RUN /build/ctl.sh build_browsh_binary $BASE

  3. Finally, instead of chaning /etc/hosts in the image, I changed it on the run:
    RUN echo 'curl -o /etc/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts' >> /entrypoint.sh
    RUN chmod +x /entrypoint.sh
    ENTRYPOINT ["/entrypoint.sh"]

I will fix the error and make a pull request, but people can use this until then. The above instruction also fixed some other issues reported failing to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant