From 9452f11bf9cbfe2c3432a72c30fd0c65fbf79e54 Mon Sep 17 00:00:00 2001 From: allegroai Date: Wed, 24 Jul 2024 03:54:33 +0300 Subject: [PATCH] Add build.sh to build dropbearmulti inside a docker --- Dockerfile | 14 ++++++++++++++ build.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100755 build.sh 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