forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile.arm
33 lines (26 loc) · 1.03 KB
/
Dockerfile.arm
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
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-arm-linux-gnueabi \
git ca-certificates \
autoconf \
make \
patch
WORKDIR /root
COPY musl_system.patch /root
RUN git clone git://git.musl-libc.org/musl && \
cd /root/musl && \
git checkout 91e662d1d941215eb024787db5e910dbfb5b169f && \
mkdir build && \
cd build && \
../configure --prefix=/root/install/musl --host=arm-linux-gnueabi && \
make -j12 && make install /root/install/musl/bin/musl-gcc /root/install/musl/lib/musl-gcc.specs && \
rm -rf /root/musl
WORKDIR /root/openssh
COPY . /root/openssh
RUN cd /root/openssh && \
autoconf && \
mkdir build && \
cd build && \
INSTALL=/root/openssh/install-sh LDFLAGS=-static CFLAGS="-O3 -fomit-frame-pointer -ffast-math" CC=/root/install/musl/bin/musl-gcc ../configure --prefix=/root/install/ --host=arm-linux-gnueabi --without-zlib --without-openssl && \
make ssh sshd && \
STRIPPROG=arm-linux-gnueabi-strip make install-ssh install-sshd