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

Dockerfile fix by Farzad Qassemi for broken golang tarball link. #526

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM bitnami/minideb:bullseye as build

RUN install_packages \
curl \
wget\
ca-certificates \
git \
autoconf \
Expand Down Expand Up @@ -31,6 +32,8 @@ ENV BASE=$GOPATH/src/browsh/interfacer
ADD interfacer $BASE
WORKDIR $BASE
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

###########################
Expand All @@ -56,9 +59,12 @@ RUN install_packages \

# Block ads, etc. This includes porn just because this image is also used on the
# public SSH demo: `ssh brow.sh`.
RUN curl \
-o /etc/hosts \
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
#RUN curl \
# -o /etc/hosts \
# https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts

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

# Don't use root
RUN useradd -m user --home /app
Expand All @@ -77,5 +83,6 @@ RUN TERM=xterm script \
>/dev/null & \
sleep 10

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/app/bin/browsh"]

3 changes: 2 additions & 1 deletion scripts/misc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ function install_golang() {
GOARCH=$(uname -m)
[[ $GOARCH == aarch64 ]] && GOARCH=arm64
[[ $GOARCH == x86_64 ]] && GOARCH=amd64
url=https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
#url=https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
url=https://go.dev/dl/go"$version".8.linux-"$GOARCH".tar.gz
echo "Installing Golang ($url)... to $GOROOT"
curl -L \
-o go.tar.gz \
Expand Down