diff --git a/Dockerfile b/Dockerfile index c1928bb..2fc7685 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,14 @@ -FROM ubuntu:22.04 +FROM alpine:3.17.1 AS builder -ENV LC_ALL=C.UTF-8 - -RUN apt-get update - -RUN apt-get install -y build-essential git autoconf +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/ -# ./configure --disable-zlib --disable-syslog --enable-static --disable-harden -# make PROGRAMS="dropbear dropbearconvert" - ENTRYPOINT ["bash"] diff --git a/build.sh b/build.sh index 5ca02c3..1e93564 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,6 @@ docker build -t dropbearbuild -f Dockerfile . -docker run --rm -t -v $(pwd):/root/dropbear dropbearbuild -c "./configure --disable-zlib --disable-syslog --enable-static --disable-harden && make PROGRAMS=\"dropbear dropbearconvert\"" +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\"" docker image rm dropbearbuild