Update Dockerfile
Browse files- Dockerfile +29 -3
Dockerfile
CHANGED
@@ -62,14 +62,40 @@ RUN RELEASE_TAG=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscod
|
|
62 |
cp ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/openvscode-server ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/code && \
|
63 |
rm -f ${RELEASE_TAG}-linux-${arch}.tar.gz
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
-
# Download and install GeckoDriver
|
67 |
-
RUN
|
68 |
-
|
|
|
69 |
sudo mv geckodriver /usr/local/bin/ && \
|
70 |
sudo chmod +x /usr/local/bin/geckodriver && \
|
|
|
71 |
geckodriver --version
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
WORKDIR /home/user/
|
75 |
|
|
|
62 |
cp ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/openvscode-server ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/code && \
|
63 |
rm -f ${RELEASE_TAG}-linux-${arch}.tar.gz
|
64 |
|
65 |
+
# Install Firefox
|
66 |
+
RUN install -d -m 0755 /etc/apt/keyrings && \
|
67 |
+
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null && \
|
68 |
+
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}' && \
|
69 |
+
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null && \
|
70 |
+
echo 'Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000\n' | tee /etc/apt/preferences.d/mozilla && \
|
71 |
+
apt-get update && \
|
72 |
+
apt-get install -y firefox
|
73 |
|
74 |
+
# Download and install latest GeckoDriver
|
75 |
+
RUN GECKO_DRIVER_VERSION=$(curl -sS https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep tag_name | cut -d '"' -f 4) && \
|
76 |
+
wget https://github.com/mozilla/geckodriver/releases/download/${GECKO_DRIVER_VERSION}/geckodriver-${GECKO_DRIVER_VERSION}-linux64.tar.gz && \
|
77 |
+
tar -xvzf geckodriver-${GECKO_DRIVER_VERSION}-linux64.tar.gz && \
|
78 |
sudo mv geckodriver /usr/local/bin/ && \
|
79 |
sudo chmod +x /usr/local/bin/geckodriver && \
|
80 |
+
rm geckodriver-${GECKO_DRIVER_VERSION}-linux64.tar.gz && \
|
81 |
geckodriver --version
|
82 |
|
83 |
+
# Install latest Chrome (headless)
|
84 |
+
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
85 |
+
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
|
86 |
+
apt-get update && \
|
87 |
+
apt-get install -y google-chrome-stable && \
|
88 |
+
apt-get clean && \
|
89 |
+
rm -rf /var/lib/apt/lists/*
|
90 |
+
|
91 |
+
|
92 |
+
# Download and install latest ChromeDriver
|
93 |
+
RUN CHROME_DRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE) && \
|
94 |
+
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip && \
|
95 |
+
unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ && \
|
96 |
+
rm /tmp/chromedriver.zip && \
|
97 |
+
chmod +x /usr/local/bin/chromedriver
|
98 |
+
|
99 |
|
100 |
WORKDIR /home/user/
|
101 |
|