blob: 9f928a09509435ebdc142e1d70028be80686bd5d (
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.20
RUN apk update && apk add \
make \
gcc \
pkgconf \
musl-dev \
wget
RUN wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz
RUN tar -xf libsodium-1.0.20.tar.gz
WORKDIR /build-libsodium
RUN CFLAGS="-ffunction-sections -fdata-sections -Os" \
../libsodium-1.0.20/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.20/usr/local/ /opt/spm/libsodium-1.0.20
|