Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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

This comment has been minimized.

Copy link

@briceburg briceburg commented Jan 18, 2021

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

This comment has been minimized.

Copy link

@sarlalian sarlalian commented Jan 20, 2021

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