Skip to content

Commit

Permalink
update jool to 4.0.5
Browse files Browse the repository at this point in the history
based on debian image as building currently fails on alpines musl
compiler
  • Loading branch information
Jasper-Ben committed Sep 30, 2019
1 parent 4eaa804 commit 113e21e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
63 changes: 36 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
FROM alpine:latest as BUILD
FROM debian:buster-slim

LABEL maintainer="Jasper Orschulko <jasper@fancydomain.eu>"

ARG JOOL_VER=3.5.7
ARG JOOL_VER=4.0.5

RUN set -ex \
&& apk --no-cache add \
&& apt-get update \
&& apt-get install -y \
wget \
ca-certificates \
gcc \
build-base \
libnl3-dev \
build-essential \
pkg-config \
libnl-3-dev \
# needed for autogen.sh
autoconf \
automake \
bash \
# needed to stop the build from failing on the kernel module. Other than that, not needed, since kernel module only matters on host
linux-headers \
# alpine linux is based on musl libc instead of gnu libc, so installing argp-standalone
argp-standalone \
&& update-ca-certificates \
libtool \
libxtables-dev \
libnl-genl-3-dev \
# needed to stop the build from failing on the kernel module (even though never used in container)
linux-headers-amd64 \
&& wget https://github.com/NICMx/Jool/archive/v${JOOL_VER}.tar.gz -O /jool.tar.gz \
&& mkdir /jool \
&& tar -xvf /jool.tar.gz -C /jool --strip-components=1 \
&& cd /jool/usr \
&& cd /jool \
&& ./autogen.sh \
# Add LIBNLGENL3_CFLAGS and LIBNLGENL3_LIBS to configure if you chose not to install pkg-config.
&& ./configure LIBNLGENL3_CFLAGS=-I/usr/include/libnl3 LIBNLGENL3_LIBS="-lnl-genl-3 -lnl-3" \
&& ./configure \
&& make -j$(nproc) \
&& make install


FROM alpine:latest

LABEL maintainer="Jasper Orschulko <jasper@fancydomain.eu>"

RUN set -ex \
&& apk --no-cache add \
libnl3

COPY --from=build /usr/local/bin/jool_siit /usr/bin/jool_siit
COPY --from=build /usr/local/share/man/man8/jool_siit.8 /usr/share/man/man8/jool_siit.8
COPY --from=build /usr/local/bin/joold /usr/bin/joold
&& make install \
&& apt-get remove --purge -y \
wget \
gcc \
build-essential \
pkg-config \
libnl-3-dev \
autoconf \
automake \
libtool \
libxtables-dev \
libnl-genl-3-dev \
linux-headers-amd64 \
&& apt-get autoremove -y \
&& apt-get install -y \
libnl-3-200 \
libxtables12 \
&& rm -rf /var/lib/apt/lists \
&& mv /usr/local/bin/jool_siit /usr/bin/ \
&& mv /usr/local/bin/joold /usr/bin/ \
&& mkdir -p /usr/share/man/man8/ \
&& mv /usr/local/share/man/man8/jool_siit.8 /usr/share/man/man8/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Jasper Ben
Copyright (c) 2018 Jasper Orschulko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

JOOL_VERSION='3.5.7'
JOOL_VERSION='4.0.5'

# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
Expand Down

0 comments on commit 113e21e

Please sign in to comment.