-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (52 loc) · 1.2 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
49
50
51
52
53
54
55
56
57
58
59
60
61
# `build` Target
## Base Image
FROM alpine:latest as build
## Install Slicer Dependencies
RUN ["/bin/ash","-c","\
apk --no-cache add \
g++ \
gcc \
gfortran \
gnupg \
linux-headers \
make \
texinfo \
wget \
&& rm -rf /var/cache/apk/* \
"]
## Install GNU GDB
RUN ["/bin/ash","-c","\
mkdir gdb-build \
&& cd gdb-build \
&& wget https://ftp.gnu.org/gnu/gdb/gdb-8.1.tar.xz \
&& wget https://ftp.gnu.org/gnu/gdb/gdb-8.1.tar.xz.sig \
&& wget https://ftp.gnu.org/gnu/gnu-keyring.gpg \
&& gpg --import ./gnu-keyring.gpg \
&& gpg --verify --keyring ./gnu-keyring.gpg gdb-8.1.tar.xz.sig \
&& tar -xvf gdb-8.1.tar.xz \
&& cd gdb-8.1 \
&& ./configure --prefix=/usr \
&& make \
&& make -C gdb install \
&& cd .. \
&& rm -rf gdb-build/ \
"]
# `gdbserver` Target
## Base Image
FROM alpine:latest as gdbserver
## Set execution environment
COPY --from=build /usr/bin/gdbserver /usr/bin/gdbserver
## Install Slicer Dependencies
RUN ["/bin/ash","-c","\
apk --no-cache add \
libgcc \
libstdc++ \
musl \
openssh \
&& rm -rf /var/cache/apk/* \
"]
## Install SSH server support keys
RUN ["/bin/ash","-c","\
ssh-keygen -A \
"]
ENTRYPOINT ["gdbserver"]