| 
									
										
										
										
											2020-02-28 14:40:26 -08:00
										 |  |  | # Running Playwright in Docker
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-03 12:21:21 -08:00
										 |  |  | [Dockerfile.bionic](Dockerfile.bionic) is a playwright-ready image of playwright. | 
					
						
							| 
									
										
										
										
											2020-02-28 14:40:26 -08:00
										 |  |  | This image includes all the dependencies needed to run browsers in a Docker | 
					
						
							|  |  |  | container. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Building image: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | $ sudo docker build -t microsoft/playwright:bionic -f Dockerfile.bionic . | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Running image: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2020-04-07 11:21:42 -07:00
										 |  |  | $ sudo docker container run -it --rm --security-opt seccomp=chrome.json microsoft/playwright:bionic /bin/bash | 
					
						
							| 
									
										
										
										
											2020-02-28 14:40:26 -08:00
										 |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > **NOTE**: The seccomp profile is coming from Jessie Frazelle. It's needed
 | 
					
						
							|  |  |  | > to run Chrome without sandbox.
 | 
					
						
							|  |  |  | 
 |