feature: add volume for saving configs

This commit is contained in:
Peter Galonza 2025-03-29 19:44:49 +03:00
parent 2a6e6a1e24
commit 5453874bba
No known key found for this signature in database
GPG key ID: C85D94460DBECFA2
6 changed files with 38 additions and 9 deletions

View file

@ -1,3 +1,8 @@
# Create docker volume if not exists
if ! sudo docker volume ls | grep -q $CONTAINER_NAME; then
sudo docker volume create $CONTAINER_NAME
fi
# Run container
sudo docker run -d \
--log-driver none \
@ -7,6 +12,7 @@ sudo docker run -d \
--cap-add=SYS_MODULE \
-p $WIREGUARD_SERVER_PORT:$WIREGUARD_SERVER_PORT/udp \
-v /lib/modules:/lib/modules \
-v $CONTAINER_NAME:/opt/amnezia \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--name $CONTAINER_NAME \
$CONTAINER_NAME