Add build.sh to build dropbearmulti inside a docker

This commit is contained in:
allegroai 2024-07-24 03:54:33 +03:00
parent ed8f0da039
commit 9452f11bf9
2 changed files with 21 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM alpine:3.17.1 AS builder
RUN apk add --no-cache alpine-sdk
RUN apk add --no-cache \
musl-dev \
zlib-dev \
tar \
bzip2 \
bash
RUN mkdir -p /root/dropbear/
WORKDIR /root/dropbear/
ENTRYPOINT ["bash"]

7
build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
docker build -t dropbearbuild -f Dockerfile .
docker run --rm -t -v $(pwd):/root/dropbear dropbearbuild -c "./configure --disable-utmp --disable-wtmp --disable-lastlog --disable-zlib --disable-syslog --enable-static --disable-harden && make clean && make -j4 MULTI=1 PROGRAMS=\"dropbear dropbearconvert dropbearkey\" && mv dropbearmulti dropbearmulti_ && make clean && mv dropbearmulti_ dropbearmulti"
docker image rm dropbearbuild