a docker container to compile headless chrome for AWS lambda
It compile a chrome headless_shell
for Amazon Linux.
You can get the compiled headless_shell in releases.
Or, You could extract form the container from DockerHub
Run the docker container.
$ sudo docker run -dt --name headless-chrome headless-chrome:61.0.3114.0
a00464b6789e763b7797001b636dab494d171126da666450af9a7a463ef6b03e
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a00464b6789e headless-chrome:61.0.3114.0 "/bin/bash" 4 seconds ago Up 3 seconds
Copy the headless_shell
into your host machine.
$ sudo docker cp headless-chrome:/chrome/Chromium/src/out/Headless/headless_shell .
To build chrome headless_shell, you should change the CHROMIUM_VERSION
in Dockerfile
.
You can see the release tags here.
$ sudo docker build -t headless-chrome:61.0.3114.0 .
It takes about 3 hours on AWS c4.xlarge EC2 instance. Also, it needs 8GB of RAM and 50GB disk at least.