diff --git a/Dockerfile.armhf b/Dockerfile.armhf new file mode 100644 index 0000000..420a241 --- /dev/null +++ b/Dockerfile.armhf @@ -0,0 +1,41 @@ +FROM python:3.7-slim-buster +WORKDIR /code +RUN sed -i "s#deb http://deb.debian.org/debian buster main#deb http://deb.debian.org/debian buster main contrib non-free#g" /etc/apt/sources.list \ + && apt-get update \ + && apt-get install -y --no-install-recommends --no-install-suggests \ + wget \ + gcc \ + g++ \ + firefox-esr \ + # cryptography build dependencies + libffi-dev \ + libssl-dev \ + # for building geckodriver from source + curl \ + unzip \ + # cross-compiler toolchain + gcc-arm-linux-gnueabihf \ + libc6-armhf-cross \ + libc6-dev-armhf-cross \ + # rust language for building cryptography and geckodriver + && curl https://sh.rustup.rs -sSf | sh -s -- -y \ + && . $HOME/.cargo/env \ + && rustup target install armv7-unknown-linux-gnueabihf \ + && wget https://hg.mozilla.org/mozilla-central/archive/tip.zip \ + && unzip tip.zip \ + && mv mozilla-central-* mozilla-central \ + && rm tip.zip \ + && printf "[target.armv7-unknown-linux-gnueabihf]\nlinker = \"arm-linux-gnueabihf-gcc\"" >> mozilla-central/testing/geckodriver/.cargo/config \ + && cd mozilla-central/testing/geckodriver \ + && cargo build --release --target armv7-unknown-linux-gnueabihf \ + && cd - \ + && cp mozilla-central/target/armv7-unknown-linux-gnueabihf/release/geckodriver /usr/bin/ \ + && rm -rf mozilla-central \ + && wget -O '/tmp/requirements.txt' https://raw.githubusercontent.com/InstaPy/instapy-docker/master/requirements.txt \ + && pip install --no-cache-dir -U -r /tmp/requirements.txt \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/requirements.txt \ + # Disabling geckodriver log file + && sed -i "s#browser = webdriver.Firefox(#browser = webdriver.Firefox(service_log_path=os.devnull,#g" /usr/local/lib/python3.7/site-packages/instapy/browser.py +COPY *.py /code/ +CMD ["python", "docker_quickstart.py"]