Completed

Make Headless Google Chrome work in a Ubuntu Docker Container

I'm trying to get [login to view URL] working with PHP7 inside an Ubuntu Docker container. When I run my example script, I get:

Error: Failed to launch chrome!

[0521/013338.678573:ERROR:[login to view URL](89)] Running as root without --no-sandbox is not supported. See [login to view URL]

TROUBLESHOOTING: [login to view URL]

at onClose (/usr/local/lib/node_modules/puppeteer/lib/[login to view URL]:14)

at [login to view URL] (/usr/local/lib/node_modules/puppeteer/lib/[login to view URL]:50)

at emitNone ([login to view URL]:20)

at [login to view URL] ([login to view URL]:7)

at [login to view URL] (readl in /temp/vendor/spatie/browsershot/src/[login to view URL] on line 658

I am passing the "no-sandbox" flag, but it doesn't seem to get the job done. Here's my example code:

$browser = new Browsershot;

$browser->addChromiumArguments(["no-sandbox"])->url("[login to view URL]")->save("[login to view URL]");

As I Google around, I'm getting way over my head in Kernel, SUID, etc. and could use a hand pointing out what is wrong and where to go next.

It is important to note that we will use this to access unknown sites, so I cannot extend special permissions to the container. It needs to work with "docker run -it <imagename> bash"

A lot of freelancers think that the bidding process is a race. I'm not going to pick the first person, so take your time responding. Let me know that you read my project briefing by making the first word of your reply "stegosaurus." About 80% of freelancers don't do this, so you are now ahead.

Skills: Docker, Google Chrome, Linux, PHP, Ubuntu

See more: google chrome docker container, alpine chrome headless, karma chrome headless docker, docker node chrome headless, chrome headless docker, headless chrome, docker chrome headless pdf, chrome headless docker-compose, google chrome tabs, tab control google chrome, delphi tabs google chrome, google chrome project, fix text rendering google chrome, website doesnt show properly google chrome, use google chrome delphi programming, google chrome gifs, google chrome doesn show website graphics, css specific browser google chrome, google chrome gif bug, google chrome images bug

About the Employer:
( 16 reviews ) Alpharetta, United States

Project ID: #19701698

Awarded to:

duythu0211

stegosaurus * UPDATE: - This is result after fixed: [login to view URL] Hello sir, nice to meet you! I'm a DevOps engineer with experience in L More

$30 USD in 1 day
(23 Reviews)
3.7

5 freelancers are bidding on average $82 for this job

bms8197

Hello there, I have quite extensive experience with linux systems/servers. I've been working for more than 6 years for different web hosting companies and now I'm working as a Senior Linux Engineer/Administrator. More

$55 USD in 3 days
(75 Reviews)
5.7
jungleru

stegosaurus Hi, I fixed this issue

$30 USD in 1 day
(14 Reviews)
5.5
BlackEagle86

Hi, How are you? Hope you are going well! I checked your project carefully, so that i feel very confident in your project because I am talented web and mobile app developer with 6 years experiences. If you give me al More

$155 USD in 3 days
(6 Reviews)
4.9
SammyOpiyo

stegosaurus. Hello, I am a Backend Developer with 3 years experience who for the past 1 year has been getting his hands dirty with Devops as well as building Restful APIs. I am proficient with tools such as Docker, More

$140 USD in 7 days
(9 Reviews)
3.7