diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2fc7685 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6721a8b --- /dev/null +++ b/build.sh @@ -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