-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (26 loc) · 833 Bytes
/
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
FROM debian:9 AS builder
# Install prerequistes
RUN apt-get update
RUN apt-get install -y gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
make wget libexpat-dev \
gcc g++ zip
# Cleaning up to reduce image size
RUN apt-get autoremove -y
RUN apt-get clean -y
RUN apt-get autoclean -y
WORKDIR /root
RUN mkdir tmp
WORKDIR /root/tmp
COPY ./build-gdb.sh ./build-gdb.sh
RUN chmod +x ./build-gdb.sh
ENV GDB_VERSION "8.3"
ENV HOST "x86_64-linux-gnu"
ENV TARGET "arm-linux-gnueabihf"
ENV TARGET_TOOLCHAIN "arm-linux-gnueabihf-"
ENV OUTPUT "/root/gdb-cross.tar.gz"
RUN ./build-gdb.sh ${OUTPUT}
FROM alpine:latest
WORKDIR /root/
COPY --from=builder /root/gdb-cross.tar.gz /root/gdb-cross.tar.gz
CMD cat /root/gdb-cross.tar.gz