Skip to content

docker images fails to build  #516

Open
@fqassemi

Description

@fqassemi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions