-
Notifications
You must be signed in to change notification settings - Fork 128
/
Dockerfile
35 lines (34 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM mcr.microsoft.com/dotnet/sdk:6.0
LABEL maintainer "Ocaramba <ocaramba@objectivity.co.uk>"
#=========
# Midnight Commander, lbzip2
#=========
RUN apt-get update && apt-get install -y && apt-get --yes install mc && apt-get --yes install lbzip2 && apt-get --yes install jq
#=========
# Chrome
#=========
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
#=========
# Chrome driver
#=========
RUN CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") && \
wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" && \
unzip /chromedriver/chromedriver* -d /chromedriver
#=========
# Firefox
#=========
RUN wget --no-verbose -O /tmp/firefox.tar.bz2 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US' \
&& lbzip2 -d /tmp/firefox.tar.bz2 && tar -C /opt -xvf /tmp/firefox.tar && rm /tmp/firefox.tar && ln -fs /opt/firefox/firefox /usr/bin/firefox \
&& apt-get install libdbus-glib-1-2
#=========
# Firefox driver
#=========
RUN BASE_URL=https://github.com/mozilla/geckodriver/releases/download \
&& VERSION=$(curl -sL \
https://api.github.com/repos/mozilla/geckodriver/releases/latest | \
jq -r '.tag_name') \
&& curl -sL "$BASE_URL/$VERSION/geckodriver-$VERSION-linux64.tar.gz" | \
tar -xz -C /usr/local/bin
ENV ASPNETCORE_ENVIRONMENT Linux