-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
48 lines (40 loc) · 1.7 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
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM debian:latest
LABEL authors=Mozilla,jamesmortensen
#========= tags
# local/geckodriver-arm-builder
#=========
ARG GECKODRIVER_VERSION
USER root
#===========
# Install dependencies and clone geckodriver source
#===========
WORKDIR /opt
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \
&& apt-get update -qqy \
&& apt install gcc build-essential git cargo ca-certificates curl --no-install-recommends -y \
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \
&& git clone https://github.com/mozilla/geckodriver.git && cd geckodriver \
&& git checkout v$GECKODRIVER_VERSION \
&& apt-get autoremove -y && apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN apt-get update -qqy \
&& apt install -y gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross \
&& apt install -y gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross \
&& /root/.cargo/bin/rustup target install armv7-unknown-linux-gnueabihf \
&& /root/.cargo/bin/rustup target install aarch64-unknown-linux-gnu \
&& cd geckodriver \
&& echo "[target.armv7-unknown-linux-gnueabihf]" >> .cargo/config \
&& echo "linker = \"arm-linux-gnueabihf-gcc\"" >> .cargo/config \
&& echo "[target.aarch64-unknown-linux-gnu]" >> .cargo/config \
&& echo "linker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config \
&& apt-get autoremove -y && apt-get clean -y \
&& rm -rf /var/lib/apt/list/* /var/cache/apt/*
#===========
# Copy build script to container
#===========
COPY build-geckodriver-arm.sh /opt/geckodriver/
#===========
# Build geckodriver arm binary and copy to $PWD/artifacts
#===========
#RUN cd geckodriver && sh build-geckodriver-arm.sh
CMD sh build-geckodriver-arm.sh