scion-backbone / sbas

Prototype implementation for the Secure Backbone AS (SBAS) routing system.
0 stars 1 forks source link

WG server configuration is not built correctly #8

Closed joelwanner closed 3 years ago

joelwanner commented 4 years ago

The reload.sh script in the node directory uses docker-compose build to build our WireGuard image. However, I noticed that the environment variables in the default WireGuard configurations are never substituted (this should happen in node/docker/wireguard/Dockerfile:35).

Why is this the case? Perhaps it would be easier to generate the configuration on the host machine first and then copy it into the WireGuard container.

birgelee commented 4 years ago

I mentioned this in an email a while back. You need to use --build-args with docker compose build to pass the env variables in. The virtual machines do not share envs with the host.

birgelee commented 4 years ago

The proper format is in the old build.sh from before the dynamic rewrite.

joelwanner commented 4 years ago

From Compose file reference:

If your service specifies a build option, variables defined in environment are not automatically visible during the build. Use the args sub-option of build to define build-time environment variables.

joelwanner commented 4 years ago

This option might be useful.

joelwanner commented 4 years ago

I tested it (see most recent commits), but with no success yet. Maybe a clean build of the Docker images is required? I couldn't figure out how to do this on short notice.