mirror of
https://github.com/donaldzou/WGDashboard
synced 2025-02-26 05:58:47 +00:00
Added Dockerfile use kernel version of AmneziaWG
This commit is contained in:
parent
e97c3a0807
commit
57b17848f9
27
Ubuntu.Dev.Kernel.Version.Compose.yaml
Normal file
27
Ubuntu.Dev.Kernel.Version.Compose.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
services:
|
||||
wireguard-dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Ubuntu.Dev.Kernel.Version.Dockerfile
|
||||
#image: donaldzou/wgdashboard:latest
|
||||
restart: unless-stopped
|
||||
container_name: wgdashboard
|
||||
#environment:
|
||||
#- tz= # <--- Set container timezone, default: Europe/Amsterdam.
|
||||
#- global_dns= # <--- Set global DNS address, default: 1.1.1.1.
|
||||
#- isolate= # <--- Set the interfaces that will disallow peer communication, default: 'none'.
|
||||
#- public_ip= # <--- Set public IP to ensure the correct one is chosen, defaulting to the IP give by ifconfig.me.
|
||||
ports:
|
||||
- 10086:10086/tcp
|
||||
- 51820:51820/udp
|
||||
volumes:
|
||||
- conf:/etc/wireguard
|
||||
- data:/data
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
|
||||
volumes:
|
||||
conf:
|
||||
data:
|
30
Ubuntu.Dev.Kernel.Version.Dockerfile
Normal file
30
Ubuntu.Dev.Kernel.Version.Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM ubuntu:jammy
|
||||
WORKDIR /WGDashboard
|
||||
ENV TZ=UTC
|
||||
EXPOSE 10086
|
||||
COPY ./src /WGDashboard/
|
||||
|
||||
RUN cp -f /etc/apt/sources.list /etc/apt/sources.list.backup && \
|
||||
sed "s/# deb-src/deb-src/" /etc/apt/sources.list.backup > /etc/apt/sources.list && \
|
||||
apt-get update -y && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install wireguard sudo python3 python3-venv python3-pip net-tools -y && \
|
||||
apt install iproute2 -y && \
|
||||
apt install -y software-properties-common python3-launchpadlib gnupg2 && add-apt-repository ppa:amnezia/ppa -y && \
|
||||
sudo apt-get install -y amneziawg && \
|
||||
mkdir -p /etc/amnezia/amneziawg
|
||||
|
||||
# Copy AmneziaWG binaries
|
||||
COPY entrypoint.sh /WGDashboard/entrypoint.sh
|
||||
|
||||
# Install necessary tools and libraries in the final image
|
||||
RUN chmod +x /WGDashboard/wgd.sh && chmod +x /WGDashboard/entrypoint.sh
|
||||
|
||||
RUN if [ ! -c /dev/net/tun ]; then \
|
||||
mkdir -p /dev/net && mknod /dev/net/tun c 10 200; \
|
||||
fi
|
||||
|
||||
|
||||
RUN ./wgd.sh install
|
||||
# Start the script and keep it alive by tailing the logs
|
||||
CMD ["/bin/bash", "-c", "/WGDashboard/wgd.sh start && tail -f /dev/null"]
|
Loading…
Reference in New Issue
Block a user