-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.build | ||
*.yaml | ||
qemu-*-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,38 @@ | ||
FROM bitnami/minideb | ||
FROM debian:stable-slim as builder | ||
|
||
MAINTAINER Jay MOULIN <[email protected]> <http://twitter.com/moulinjay> | ||
ADD qemu-*-static /usr/bin/ | ||
|
||
FROM builder | ||
|
||
LABEL maintainer="Jay MOULIN <[email protected]> <http://twitter.com/moulinjay>" | ||
|
||
ENV CHROME_DEBUG_PORT=9222 | ||
ARG ISARM=0 | ||
|
||
# Install deps + add Chrome Stable + purge all the things | ||
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg --no-install-recommends && \ | ||
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 google-chrome-stable --no-install-recommends && \ | ||
apt-get purge --auto-remove -y curl gnupg && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
groupadd -r chrome && useradd -r -g chrome -G audio,video chrome && \ | ||
mkdir -p /home/chrome/reports && chown -R chrome:chrome /home/chrome | ||
RUN if [ ${ISARM:-0} = 1 ]; then echo "\ | ||
deb http://ports.ubuntu.com/ trusty main restricted universe multiverse \ | ||
deb http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse \ | ||
deb http://ports.ubuntu.com/ trusty-security main restricted universe multiverse \ | ||
" >> /etc/apt/sources.list; else echo "\ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic universe \ | ||
deb-src http://archive.ubuntu.com/ubuntu/ bionic universe \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe \ | ||
deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse \ | ||
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse \ | ||
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted \ | ||
deb http://security.ubuntu.com/ubuntu/ bionic-security universe \ | ||
deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe \ | ||
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse \ | ||
" >> /etc/apt/sources.list; fi && \ | ||
apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg chromium-browser --no-install-recommends --allow-unauthenticated && \ | ||
apt-get purge --auto-remove -y curl gnupg --allow-remove-essential && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
groupadd -r chrome && useradd -r -g chrome -G audio,video chrome && \ | ||
mkdir -p /home/chrome/reports && chown -R chrome:chrome /home/chrome | ||
|
||
COPY entrypoint.sh /usr/bin/entrypoint | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
VERSION ?= 0.2.0 | ||
FULLVERSION ?= ${VERSION} | ||
archs = arm32v7 amd64 i386 | ||
.PHONY: all build publish latest version | ||
all: build publish | ||
build: | ||
cp /usr/bin/qemu-*-static . | ||
$(foreach arch,$(archs), \ | ||
cat Dockerfile | sed "s/FROM debian:stable-slim/FROM $(arch)\/debian:stable-slim/g" > .build; \ | ||
if [ $(arch) = arm32v7 ]; then \ | ||
docker build -t femtopixel/google-chrome-headless:${VERSION}-$(arch) -f .build --build-arg ISARM=1 .;\ | ||
else docker build -t femtopixel/google-chrome-headless:${VERSION}-$(arch) -f .build --build-arg ISARM=0 .;\ | ||
fi;\ | ||
) | ||
publish: | ||
docker push femtopixel/google-chrome-headless | ||
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml | ||
cat manifest2.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}-debian/g" > manifest.yaml | ||
manifest-tool push from-spec manifest.yaml | ||
latest: build | ||
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml | ||
cat manifest2.yaml | sed "s/\$$FULLVERSION/latest/g" > manifest.yaml | ||
manifest-tool push from-spec manifest.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
image: femtopixel/google-chrome-headless:$FULLVERSION | ||
manifests: | ||
- | ||
image: femtopixel/google-chrome-headless:$VERSION-arm32v7 | ||
platform: | ||
architecture: arm | ||
variant: v7 | ||
os: linux | ||
- | ||
image: femtopixel/google-chrome-headless:$VERSION-i386 | ||
platform: | ||
architecture: 386 | ||
os: linux | ||
- | ||
image: femtopixel/google-chrome-headless:$VERSION-amd64 | ||
platform: | ||
architecture: amd64 | ||
os: linux |