Dear community. I have a docker compose setup e.g. for Grafana running a MACVLAN so the container virtually looks like an own computer with it’s own IP Address under which I can access the frontend. To not expose the frontend to the Internet I would like to include the remote.it agent to it, so if required I can create a “tunnel” to it, and access it via remote.it proxy. I do not find many docker examples on how this could be achieved. Of course I can install remote.it on the host, but I’d really appreciate that I could include it into the container-setup so it gives access to the “virtual computer” that this container creates. Can anyone help me?
Found the solution myself. For anyone who can make use of it an example of a compose script, based on Grafana. This would allow you to use the remote-it agent to expose the webgui of a Grafana Docker container, running in a dedicated macvlan network, via remote-it services.
version: “3.8”
services:
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
restart: always
environment:
- TZ=Europe/Berlin
# all other environment parameters GF_SERVER_PORT/GF_SERVER_DOMAIN etc.
volumes:
# your volume mappings
networks:
mymacvlan:
ipv4_address: 192.xxx.xxx.xx #your IP_v4/v6 definitions for this container
remoteit-agent:
restart: unless-stopped
image: remoteit/remoteit-agent:latest
container_name: remote-it-agent
environment:
- R3_REGISTRATION_CODE=“here_goes_your_reg_code”
network_mode: “service:grafana” #this does the trick, that the agent runs on the same-IP as your actual service which is your “MACVLAN” IP
networks:
mymacvlan:
external: true