summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: 96437e596317a3dd341e5888a93321df0c542a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
services:
  mullvad:
    build: { context: ., dockerfile: Dockerfile.mullvad }
    container_name: mullvad-vpn
    cap_add: [NET_ADMIN]
    devices: [/dev/net/tun:/dev/net/tun]
    restart: unless-stopped

  # Example: route any container through the VPN
  app1:
    image: rockylinux/rockylinux:10
    network_mode: "container:mullvad-vpn"
    depends_on: [mullvad]
    command: bash -c "dnf install -y curl && curl -s https://am.i.mullvad.net/connected && curl -s https://am.i.mullvad.net/ip && curl -s https://am.i.mullvad.net/country && curl -s https://am.i.mullvad.net/city"