|
| 1 | +FROM local-seleniarm/node-base:latest |
| 2 | +LABEL authors=SeleniumHQ,sj26,jamesmortensen |
| 3 | + |
| 4 | +##### tags |
| 5 | +# local-seleniarm/geckodriver-arm64:4.0.0-$(build_date) |
| 6 | +##### |
| 7 | +USER root |
| 8 | + |
| 9 | + |
| 10 | +#=========== |
| 11 | +# Debugging |
| 12 | +#=========== |
| 13 | +WORKDIR /opt |
| 14 | +RUN echo "deb http://http.us.debian.org/debian/ sid main" >> /etc/apt/sources.list \ |
| 15 | + && apt-get update -qqy \ |
| 16 | + && apt install gcc build-essential git vim cargo -y \ |
| 17 | + && curl https://sh.rustup.rs -sSf | bash -s -- -y \ |
| 18 | + && git clone https://github.com/mozilla/geckodriver.git && cd geckodriver \ |
| 19 | + && git checkout v0.30.0 |
| 20 | + |
| 21 | +RUN echo "alias l='ls -ltrSha'" >> /home/seluser/.bashrc |
| 22 | + |
| 23 | +COPY build-geckodriver-arm64.sh /opt/geckodriver/ |
| 24 | + |
| 25 | +RUN chown seluser /opt/geckodriver/build-geckodriver-arm64.sh \ |
| 26 | + && chmod 755 /opt/geckodriver/build-geckodriver-arm64.sh \ |
| 27 | + && sudo chown -R seluser /home/seluser/.rustup /home/seluser/.cargo /opt/geckodriver |
| 28 | + |
| 29 | +# COPY geckodriver /usr/local/bin/ |
| 30 | +# USER seluser |
| 31 | +# RUN sudo chown -R seluser /home/seluser/.rustup /home/seluser/.cargo /opt/geckodriver \ |
| 32 | +# && cd /opt/geckodriver \ |
| 33 | +# && cargo build \ |
| 34 | +# && sudo cp target/debug/geckodriver /usr/local/bin/ \ |
| 35 | +# && sudo apt remove gcc build-essential cargo |
| 36 | + |
| 37 | +# WORKDIR / |
| 38 | + |
| 39 | +#============ |
| 40 | +# GeckoDriver |
| 41 | +#============ |
| 42 | +# For arm64 we're sniffing a compatible binary out of an ubuntu package, don't look too hard! |
| 43 | +#RUN echo "Downloading Arm64 geckodriver..." |
| 44 | + # curl http://ports.ubuntu.com/pool/universe/f/firefox/firefox-geckodriver_75.0+build3-0ubuntu1_arm64.deb | dpkg-deb --fsys-tarfile - | tar -C / -x ./usr/bin/geckodriver; |
| 45 | + # curl http://ports.ubuntu.com/pool/universe/f/firefox/firefox-geckodriver_93.0+build1-0ubuntu3_arm64.deb | dpkg-deb --fsys-tarfile - | tar -C / -x ./usr/bin/geckodriver; |
| 46 | + |
| 47 | +USER 1200 |
0 commit comments