| 
									
										
										
										
											2020-07-20 10:35:42 -07:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | set -e | 
					
						
							|  |  |  | set +x | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Install Node.js | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | apt-get update && apt-get install -y curl && \
 | 
					
						
							| 
									
										
										
										
											2023-02-10 01:52:05 +08:00
										 |  |  |     curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
 | 
					
						
							| 
									
										
										
										
											2020-07-20 10:35:42 -07:00
										 |  |  |     apt-get install -y nodejs | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Install apt-file | 
					
						
							|  |  |  | apt-get update && apt-get install -y apt-file && apt-file update | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-11 10:52:17 -04:00
										 |  |  | # Install tip-of-tree playwright-core and browsers | 
					
						
							|  |  |  | mkdir /root/tmp && cd /root/tmp && npm init -y && npm i /root/hostfolder/playwright-core.tar.gz && npx playwright install | 
					
						
							| 
									
										
										
										
											2020-07-20 10:35:42 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | cp /root/hostfolder/inside_docker/list_dependencies.js /root/tmp/list_dependencies.js | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-29 13:38:54 -07:00
										 |  |  | FILENAME="RUN_RESULT" | 
					
						
							|  |  |  | if [[ -n $1 ]]; then | 
					
						
							|  |  |  |   FILENAME=$1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | node list_dependencies.js | tee "/root/hostfolder/$FILENAME" |