Skip to content

Instantly share code, notes, and snippets.

@tqbf
Created January 14, 2021 18:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tqbf/de134d379d03d857d2a38031e6b9aee2 to your computer and use it in GitHub Desktop.
Save tqbf/de134d379d03d857d2a38031e6b9aee2 to your computer and use it in GitHub Desktop.
# this dockerfile is a mangled version of
# https://hub.docker.com/r/justinribeiro/chrome-headless/
FROM debian:buster-slim
ENV CHROME_DEBUG_PORT=9222
ARG VERSION=87.0.4280.88
# this was LATEST when I wrote the dockerfile; prior to Sep 2020,
# remote CDP over IPv6 was busticated
ARG REVISION=841231
# download fresh chromium, but also install via apt to get the
# 8 bajillion Linux deps it has. weird ordering because my apt
# deps changed a bunch and I don't want to re-download chromium
# every time they do.
RUN apt-get update
RUN apt install -y wget
RUN wget -q -O chrome.zip https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${REVISION}/chrome-linux.zip
RUN apt-get install -y \
unzip \
dnsutils \
iproute2 \
tmux \
apt-transport-https \
ca-certificates \
curl \
libgbm-dev \
chromium \
libxss1 \
--no-install-recommends
RUN unzip chrome.zip && \
rm chrome.zip && \
ln -sf ${PWD}/chrome-linux/chrome /usr/bin/chromium && \
ln -sf /usr/bin/chromium /usr/bin/chromium-browser
# i'm not actually bothering with any of this and XXX should remove it
RUN groupadd -r chrome && useradd -r -g chrome -G audio,video chrome &&\
mkdir -p /home/chrome/reports &&\
chown -R chrome:chrome /home/chrome
RUN apt-get autoremove wget unzip -y
COPY entrypoint.sh /usr/bin/entrypoint
CMD /usr/bin/entrypoint
@briceburg
Copy link

Howdy. I'm following https://fly.io/blog/building-clusters-with-serf/ -- and of course poking about and wasting time.

Is it possible to include [via comments] or point to the contents of entrypoint.sh for reference? If it's tiny it may be helpful to print the contents as an executable and avoid the COPY directive. Thanks!

@sarlalian
Copy link

Howdy. I'm following https://fly.io/blog/building-clusters-with-serf/ -- and of course poking about and wasting time.

Is it possible to include [via comments] or point to the contents of entrypoint.sh for reference? If it's tiny it may be helpful to print the contents as an executable and avoid the COPY directive. Thanks!

https://github.com/fly-examples/ichabod looks like it has everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment