0

I am trying to run a qmcgaw/gluetun container on an Azure Container Instance. When I test it locally it works but in Azure there are no logs and it says the status is waiting. I have no experience with ports or other networking concepts in Azure that would help me find a solution. Thank you!

I tried running the docker-compose.yml locally to connect different containers to different vpn IPs using the qmcgaw/gluetun container and it worked locally. I tried the same in Azure and it doesn't rrun the container properly.

Docker compose file:

version: '3.8'
x-azure-settings:
  acr-credentials:
    - server: <acr-server-name>.azurecr.io
      username: <acr-username>
      password: <acr-password>
services:
  vpn-username:
    image: qmcgaw/gluetun
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 1024M
    ports:
       - "1194:1194/udp"
    cap_add:
      - NET_ADMIN
    environment:
      - VPNSP=protonvpn
      - OPENVPN_USER=<vpn-username>
      - OPENVPN_PASSWORD=<vpn-password>
      - SERVER_COUNTRIES=Netherlands

  script-runner-username:
    image: <acr-server-name>.azurecr.io/<your-image-name>:latest
    deploy:
      resources:
        limits:
          cpus: '0.1'
          memory: 100M
    depends_on:
      - vpn-username
    network_mode: service:vpn-username
    command: python fetchip.py

and my Python file that I turned into a simple Docker container has a simple def to get current ip.

4
  • share your docker compose file Commented Apr 4, 2024 at 6:31
  • What port did you expose? If you have multiple ports exposed (80, 443, 1194, 8080, 8443). Ensure that these ports should indeed be exposed for your application and that the application inside the container is configured to use these ports. You took qmcgaw/gluetun image from? Commented Apr 4, 2024 at 7:12
  • I updated my post to share my Docker Compose file @VivekVaibhavShandilya Commented Apr 4, 2024 at 14:28
  • I am exposing the port 1194, I just posted the docker compose file that shows it. @Arko Commented Apr 4, 2024 at 14:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.