Sign inSign up

zuijin/n2n

By zuijin

Updated over 6 years ago

alpine + n2n

Image
0

1.5K

Dockerfile
FROM alpine:3.8

RUN buildDeps=" \
		build-base \
		cmake \
		git \
		linux-headers \
		openssl-dev \
	"; \
	set -x \
	&& apk add --update openssl \
	&& apk add $buildDeps \
	&& mkdir -p /usr/src \
	&& cd /usr/src \
	&& git clone https://github.com/ntop/n2n.git \
	&& cd n2n \
	&& cmake . \
	&& make install \
	&& cd / \
	&& rm -fr /usr/src/n2n \
	&& apk del $buildDeps \
	&& rm -rf /var/cache/apk/*

ENV N2N_IP="10.0.0.2"
ENV N2N_SUPERNODE="example:10086"
ENV N2N_GROUP="xxx"
ENV N2N_PWD="xxx"

CMD ["edge", "-d", "edge0", "-r", "-a", "dhcp:${N2N_IP}", "-c" "${N2N_GROUP}", "-k", "${N2N_PWD}", "-l", "${N2N_SUPERNODE}", "-v", "-f"]