FROM alpine
RUN apk update && apk add \
	make \
	gcc \
	musl-dev \
    wget
RUN wget http://enet.bespin.org/download/enet-1.3.17.tar.gz
RUN tar -xf enet-1.3.17.tar.gz
WORKDIR /enet-1.3.17
ARG PREFIX=/opt/spm/enet-1.3.17
RUN ./configure \
    --prefix=$PREFIX \
    --enable-shared=no \
    CFLAGS='-ffunction-sections -fdata-sections -Os'
RUN make -j$(nproc --all)
RUN make install
