first
This commit is contained in:
		
						commit
						379f028e6e
					
				
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					FROM alpine:latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Switch to edge (for latest firefox)
 | 
				
			||||||
 | 
					RUN sed -i -e 's/v[[:digit:]]\.[[:digit:]]/edge/g' /etc/apk/repositories
 | 
				
			||||||
 | 
					RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
 | 
				
			||||||
 | 
					RUN apk update && apk upgrade
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN apk add firefox-esr jq xvfb curl openjdk8-jre
 | 
				
			||||||
 | 
					RUN rm -rf /var/cache/apk/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY geckodriver.sh geckodriver.sh
 | 
				
			||||||
 | 
					RUN sh geckodriver.sh
 | 
				
			||||||
							
								
								
									
										2
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					# geckodriver-alpine
 | 
				
			||||||
 | 
					Firefox and Geckodriver on Alpine edge
 | 
				
			||||||
							
								
								
									
										34
									
								
								geckodriver.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								geckodriver.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)
 | 
				
			||||||
 | 
					os=$(uname -s)
 | 
				
			||||||
 | 
					arch=$(uname -m)
 | 
				
			||||||
 | 
					if [ $os = "Linux" ] ; then
 | 
				
			||||||
 | 
					    case "$arch" in
 | 
				
			||||||
 | 
					        i386 | i486 | i786 | x86)
 | 
				
			||||||
 | 
					            url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux32"))')
 | 
				
			||||||
 | 
					            ;;        
 | 
				
			||||||
 | 
					        x86_64 | x86-64 | x64 | amd64)
 | 
				
			||||||
 | 
					            url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
 | 
					        xscale | arm | armv61 | armv71 | armv81 | aarch64)
 | 
				
			||||||
 | 
					            url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("arm7hf"))')
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
 | 
					        *)
 | 
				
			||||||
 | 
					            echo Architecture not supported: $arch
 | 
				
			||||||
 | 
					            exit 1
 | 
				
			||||||
 | 
					            ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
					elif [ $os = "Darwin" ] ; then
 | 
				
			||||||
 | 
					    url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))')
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -z $url ] ; then
 | 
				
			||||||
 | 
					    echo OS not supported: $os
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo $url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					curl -s -L "$url" | tar -xz
 | 
				
			||||||
 | 
					chmod +x geckodriver
 | 
				
			||||||
 | 
					mv geckodriver /usr/bin
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								selenium-server-standalone-3.14.0.jar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								selenium-server-standalone-3.14.0.jar
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user