-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## What * Created pritunl container ## Why * To run pritunl on k8s
- Loading branch information
Showing
7 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Override for Makefile | ||
[{Makefile, makefile, GNUmakefile}] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[Makefile.*] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build-harness/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sudo: required | ||
addons: | ||
apt: | ||
packages: | ||
- git | ||
- make | ||
- curl | ||
env: | ||
- DOCKER_IMAGE_NAME=cloudposse/pritunl | ||
services: | ||
- docker | ||
install: | ||
- make init | ||
- make docker/login | ||
|
||
script: | ||
- make docker/build | ||
|
||
after_success: | ||
- make travis/docker-tag-and-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ubuntu:16.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ENV PRITUNL_CONFIG= | ||
ENV PRITUNL_MAIN_CONFIG=/etc/pritunl.conf | ||
|
||
EXPOSE 9700 | ||
EXPOSE 443 | ||
EXPOSE 80 | ||
EXPOSE 1194 | ||
|
||
ENTRYPOINT ["/init"] | ||
|
||
ENV VERSION="1.29.1979.98" | ||
|
||
RUN echo 'deb http://repo.pritunl.com/stable/apt xenial main' > /etc/apt/sources.list.d/pritunl.list \ | ||
&& echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list \ | ||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 42F3E95A2C4F08279C4960ADD68FA50FEA312927 \ | ||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A \ | ||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 8E6DA8B4E158C569 \ | ||
&& apt-get update -q \ | ||
&& apt-get install locales \ | ||
&& locale-gen en_US en_US.UTF-8 \ | ||
&& dpkg-reconfigure locales \ | ||
&& ln -sf /usr/share/zoneinfo/UTC /etc/localtime \ | ||
&& apt-get upgrade -y -q \ | ||
&& apt-get dist-upgrade -y -q \ | ||
&& apt-get -y install pritunl iptables \ | ||
&& apt-get clean \ | ||
&& apt-get -y -q autoclean \ | ||
&& apt-get -y -q autoremove \ | ||
&& rm -rf /tmp/* | ||
|
||
ADD rootfs / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SHELL = /bin/bash | ||
export BUILD_HARNESS_PATH ?= $(shell until [ -d "build-harness" ] || [ "`pwd`" == '/' ]; do cd ..; done; pwd)/build-harness | ||
-include $(BUILD_HARNESS_PATH)/Makefile | ||
|
||
.PHONY : init | ||
## Init build-harness | ||
init: | ||
@curl --retry 5 --retry-delay 1 https://raw.githubusercontent.com/cloudposse/build-harness/master/bin/install.sh | bash | ||
|
||
.PHONY : clean | ||
## Clean build-harness | ||
clean: | ||
@rm -rf $(BUILD_HARNESS_PATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
[ "${MONGODB_URI}" ] && pritunl set-mongodb ${MONGODB_URI} | ||
|
||
if [ -f "${PRITUNL_CONFIG}" ]; then | ||
cat ${PRITUNL_CONFIG} | xargs -n 2 pritunl set | ||
fi | ||
|
||
|
||
exec env GODEBUG=netdns=cgo /usr/bin/pritunl start |