-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed WebDriverException on armv7l #8
Rebuild Dockerfile Added Rust Installtion Updated Geckodriver Update libc6 Take screenshot if measurement fails
- Loading branch information
Your Name
committed
Aug 12, 2022
1 parent
d3a2f60
commit e12202c
Showing
6 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,72 @@ | ||
FROM python:slim-bullseye | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y firefox-esr tini cron curl build-essential libssl-dev libffi-dev python3-dev cargo \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=1.62.1 | ||
|
||
RUN pip3 install --no-cache-dir \ | ||
selenium \ | ||
apprise \ | ||
psutil \ | ||
influxdb | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY speedtest.py config.shlib geckodriver.sh config.cfg.defaults ./ | ||
|
||
COPY entrypoint.sh /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN chmod +x ./geckodriver.sh && ./geckodriver.sh | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install --no-install-recommends -y firefox-esr \ | ||
tini \ | ||
cron \ | ||
gcc \ | ||
ca-certificates \ | ||
wget \ | ||
build-essential \ | ||
libssl-dev \ | ||
libffi-dev \ | ||
python3-dev \ | ||
cargo \ | ||
curl \ | ||
; \ | ||
chmod +x /usr/src/app/geckodriver.sh;\ | ||
/bin/bash /usr/src/app/geckodriver.sh; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
case "${dpkgArch##*-}" in \ | ||
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='3dc5ef50861ee18657f9db2eeb7392f9c2a6c95c90ab41e45ab4ca71476b4338' ;; \ | ||
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='67777ac3bc17277102f2ed73fd5f14c51f4ca5963adadf7f174adf4ebc38747b' ;; \ | ||
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='32a1532f7cef072a667bac53f1a5542c99666c4071af0c9549795bbdb2069ec1' ;; \ | ||
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='e50d1deb99048bc5782a0200aa33e4eea70747d49dffdc9d06812fd22a372515' ;; \ | ||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ | ||
esac; \ | ||
url="https://static.rust-lang.org/rustup/archive/1.24.3/${rustArch}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init; \ | ||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ | ||
rm rustup-init; \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | ||
rustup update; \ | ||
rustup --version; \ | ||
cargo --version; \ | ||
rustc --version; \ | ||
printf "deb http://ftp.debian.org/debian experimental main\ndeb http://ftp.debian.org/debian sid main" > /etc/apt/sources.list.d/experimental.list; \ | ||
apt-get update ;\ | ||
apt-get install --no-install-recommends -t experimental -y libc6-dev; \ | ||
apt-get remove -y --auto-remove \ | ||
wget \ | ||
curl \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
pip3 install --upgrade pip; \ | ||
pip3 install --no-cache-dir --upgrade setuptools; \ | ||
chmod +x /usr/src/app/speedtest.py; \ | ||
mkdir /export; \ | ||
chmod +x /usr/local/bin/docker-entrypoint.sh; | ||
|
||
RUN chmod +x speedtest.py | ||
RUN --mount=type=tmpfs,target=/usr/local/cargo pip3 install --no-cache-dir \ | ||
cryptography; \ | ||
pip3 install --no-cache-dir \ | ||
selenium \ | ||
apprise \ | ||
psutil \ | ||
influxdb; | ||
|
||
RUN mkdir /export | ||
|
||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"] | ||
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters