blob: c07da67a046f3154b664a1d511317de17ef1f543 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
FROM alpine as base
ARG PREFIX=/usr/local
ARG DESTDIR=/opt/spm/libsodium-1.0.21
RUN apk update && apk add \
make \
gcc \
pkgconf \
musl-dev \
wget
RUN wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.21.tar.gz
RUN tar -xf libsodium-1.0.21.tar.gz
WORKDIR /build-libsodium
RUN CFLAGS="-ffunction-sections -fdata-sections -Os" \
../libsodium-1.0.21/configure \
--prefix=$PREFIX \
--enable-static \
--enable-shared=no
RUN make -j$(nproc)
RUN make install DESTDIR=$DESTDIR
FROM scratch
COPY --from=base /opt/spm/libsodium-1.0.21/usr/local/ /opt/spm/libsodium-1.0.21
|