forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
34 lines (27 loc) · 1008 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
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
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 && \
patch -p1 < /root/musl_system.patch && \
mkdir build && \
cd build && \
../configure --prefix=/root/install/musl && \
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="-D__ANDROID__ -O3 -fomit-frame-pointer -ffast-math" CC=/root/install/musl/bin/musl-gcc ../configure --prefix=/root/install/ --without-zlib --without-openssl && \
make ssh sshd && \
make install-ssh install-sshd