mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
add browsh
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
e135194c74
commit
96a59321e9
|
@ -1,27 +1,49 @@
|
||||||
FROM alpine:latest
|
FROM debian:buster-slim
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
# Install bash so we have it.
|
# Install bash and other deps so we have them.
|
||||||
RUN apk add --no-cache \
|
RUN apt-get update && apt-get install -y \
|
||||||
bash
|
bash \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
libdbus-glib-1-2 \
|
||||||
|
libgtk-3-0 \
|
||||||
|
libx11-xcb1 \
|
||||||
|
libxt6 \
|
||||||
|
tar \
|
||||||
|
wget \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN wget "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts" -O /etc/hosts
|
||||||
|
|
||||||
|
# Create user and change ownership
|
||||||
|
RUN addgroup --gid 666 browsh \
|
||||||
|
&& adduser --uid 666 --home /home/browsh --ingroup browsh browsh
|
||||||
|
|
||||||
|
WORKDIR /home/browsh
|
||||||
|
USER browsh
|
||||||
|
|
||||||
|
RUN mkdir -p /home/browsh/bin
|
||||||
|
|
||||||
|
ENV PATH="/bin:/usr/bin:/usr/local/bin:/home/browsh/bin:${PATH}"
|
||||||
|
|
||||||
# Install firefox.
|
# Install firefox.
|
||||||
RUN apk add --no-cache \
|
ENV FIREFOX_VERSION 60.0
|
||||||
firefox \
|
RUN set -x \
|
||||||
--repository https://dl-4.alpinelinux.org/alpine/edge/testing \
|
&& wget "https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" -O /tmp/firefox.tar.bz2 \
|
||||||
|
&& ( \
|
||||||
|
cd /tmp \
|
||||||
|
&& bzip2 -d /tmp/firefox.tar.bz2 \
|
||||||
|
&& tar -xf /tmp/firefox.tar -C /home/browsh/bin/ --strip-components 1 \
|
||||||
|
) \
|
||||||
|
&& rm -rf /tmp/firefox* \
|
||||||
&& firefox --version
|
&& firefox --version
|
||||||
|
|
||||||
# Install browsh.
|
# Install browsh.
|
||||||
ENV BROWSH_VERSION 1.3.3
|
ENV BROWSH_VERSION 1.3.3
|
||||||
RUN wget "https://github.com/browsh-org/browsh/releases/download/v${BROWSH_VERSION}/browsh_${BROWSH_VERSION}_linux_amd64" -O /usr/local/bin/browsh \
|
RUN wget "https://github.com/browsh-org/browsh/releases/download/v${BROWSH_VERSION}/browsh_${BROWSH_VERSION}_linux_amd64" -O /home/browsh/bin/browsh \
|
||||||
&& chmod a+x /usr/local/bin/browsh
|
&& chmod a+x /home/browsh/bin/browsh
|
||||||
|
|
||||||
# Create user and change ownership
|
|
||||||
RUN addgroup -g 666 -S browsh \
|
|
||||||
&& adduser -u 666 -SHG browsh browsh
|
|
||||||
|
|
||||||
#WORKDIR /home/browsh
|
|
||||||
#USER browsh
|
|
||||||
|
|
||||||
# Firefox behaves quite differently to normal on its first run, so by getting
|
# Firefox behaves quite differently to normal on its first run, so by getting
|
||||||
# that over and done with here when there's no user to be dissapointed means
|
# that over and done with here when there's no user to be dissapointed means
|
||||||
|
@ -30,4 +52,4 @@ RUN TERM=xterm browsh & \
|
||||||
pidsave=$!; \
|
pidsave=$!; \
|
||||||
sleep 10; kill $pidsave || true;
|
sleep 10; kill $pidsave || true;
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/browsh" ]
|
ENTRYPOINT [ "browsh" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user