Improve piframefleet containerization
This commit is contained in:
parent
1f503db3ca
commit
3abe89ecf3
|
@ -23,7 +23,7 @@ RUN apt update && apt upgrade -y && \
|
|||
tar xzf /opt/s6-overlay.tar.gz -C / --exclude="./bin" && \
|
||||
tar xzf /opt/s6-overlay.tar.gz -C /usr ./bin && \
|
||||
echo "**** wireguard ****" && \
|
||||
apt install -y build-essential ifupdown iproute2 iptables iputils-ping libc6 libelf-dev pkg-config && \
|
||||
apt install -y build-essential ifupdown net-tools iproute2 iptables iputils-ping libc6 libelf-dev pkg-config && \
|
||||
WIREGUARD_RELEASE=$(curl -sX GET "https://api.github.com/repos/WireGuard/wireguard-tools/tags" \
|
||||
| jq -r .[0].name); \
|
||||
git clone https://git.zx2c4.com/wireguard-tools /opt/wireguard-tools && \
|
||||
|
|
|
@ -14,12 +14,23 @@ if [ ! -d "/opt/ansible" ] ; then
|
|||
mkdir /opt/ansible
|
||||
fi
|
||||
if [ ! -f "/opt/ansible/ssh.key" ] ; then
|
||||
ssh-keygen -t rsa -b 4096 -f /opt/ansible/ssh.key -N '""'
|
||||
ssh-keygen -t rsa -b 4096 -f /opt/ansible/ssh.key -N ''
|
||||
echo "
|
||||
-------------------------------------
|
||||
Ansible SSH Key"
|
||||
cat /opt/ansible/ssh.key.pub
|
||||
echo "-------------------------------------
|
||||
"
|
||||
fi
|
||||
if [ ! -d "/opt/ansible/roles" ] ; then
|
||||
mkdir /opt/ansible/roles
|
||||
fi
|
||||
if [ ! -d "/opt/ansible/roles/wireguard" ] ; then
|
||||
git clone https://git.kemonine.info/PiFrame/ansible-role-wireguard.git /opt/ansible/roles/wireguard
|
||||
else
|
||||
cd /opt/ansible/roles/wireguard
|
||||
git pull
|
||||
fi
|
||||
|
||||
####################
|
||||
# WireGuard
|
||||
|
|
|
@ -13,10 +13,10 @@ sudo docker run -it \
|
|||
--cap-add=NET_ADMIN \
|
||||
--cap-add=SYS_MODULE \
|
||||
-e TZ=UTC \
|
||||
-e ENABLE_WIREGUARD=false \
|
||||
-e ENABLE_WIREGUARD=true \
|
||||
-e ENABLE_SYNCTHING=true \
|
||||
-e ENABLE_FILEBROWSER=true \
|
||||
-p 51821:51820/udp \
|
||||
-p 51821:51821/udp \
|
||||
-p 8384:8384/tcp \
|
||||
-p 22000:22000/tcp \
|
||||
-p 9191:9191/tcp \
|
||||
|
|
Loading…
Reference in a new issue