Snippets

Loopify Docker - chrome

Created by Erlend
FROM debian:sid

# Install dependencies and clean up after install
RUN apt-get update && apt-get install -y \
	apt-transport-https \
	ca-certificates \
	curl \
	gnupg \
	--no-install-recommends \
	&& curl -sL https://deb.nodesource.com/setup_7.x | bash - \
	&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
	&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
	&& apt-get update && apt-get install -y \
	nodejs \
	google-chrome-unstable \
	--no-install-recommends \
	&& apt-get purge --auto-remove -y curl gnupg \
	&& rm -rf /var/lib/apt/lists/*

# Link volumes
VOLUME ["/var/log"]

# Add files
ADD package.json /app/
ADD test.js /app/
ADD lib /app/lib

# Add default fonts, and update font cache
ADD fonts /usr/share/fonts
ADD fonts.conf /etc/fonts/local.conf
RUN chmod 644 /usr/share/fonts/*.* && fc-cache -f -v

# Install node app
WORKDIR /app
RUN npm install

EXPOSE 1337

# Start the show!
ENTRYPOINT ["nodejs", "/app/test.js", "--chrome google-chrome", "--port 1337"]

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.