File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,41 @@ the prefix filter generator.
1313
1414# ixgen on docker
1515
16+ ## Running ixgen from Docker
17+
1618Run ixgen from docker with your peering configuration as volume parameter:
1719
18- docker run -v /Users/joerg/peering.ini:/ixgen/release/configuration/peering.ini joerg/ixgen: latest
20+ ``` bash
21+ docker run -v /path/to/peering.ini:/ixgen/configuration/peering.ini joerg/ixgen:latest
22+ ```
23+
24+ ## Building from source with Docker
25+
26+ Build ixgen from source using the Dockerfile.git:
27+
28+ ``` bash
29+ # Build without API key (skips buildcache)
30+ docker build -f docker/Dockerfile.git -t ixgen:git .
31+
32+ # Build with API key (runs buildcache during build)
33+ docker build --build-arg PEERINGDB_APIKEY=your-api-key -f docker/Dockerfile.git -t ixgen:git .
34+
35+ # Run buildcache at runtime (alternative, avoids storing API key in image)
36+ docker run -e PEERINGDB_APIKEY=your-api-key ixgen:git /ixgen/ixgen -buildcache
37+ ```
38+
39+ ### Using the built image
40+
41+ ``` bash
42+ # Run with your configuration
43+ docker run -v /path/to/peering.ini:/ixgen/configuration/peering.ini ixgen:git
44+
45+ # Run with custom cache directory
46+ docker run -v /path/to/peering.ini:/ixgen/configuration/peering.ini \
47+ -v /path/to/cache:/ixgen/cache \
48+ -e PEERINGDB_APIKEY=your-api-key \
49+ ixgen:git
50+ ```
1951
2052## how it works
2153
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ COPY --from=0 /build/bgpq4.linux /ixgen/bgpq4.linux
1919COPY --from=0 /build/bgpq4.license /ixgen/bgpq4.license
2020COPY --from=0 /build/templates /ixgen/templates
2121COPY --from=0 /build/LICENSE /ixgen/LICENSE
22- RUN /ixgen/ixgen -buildcache
22+ # Set PEERINGDB_APIKEY as build argument (optional, can be passed via --build-arg)
23+ ARG PEERINGDB_APIKEY=""
24+ ENV PEERINGDB_APIKEY=${PEERINGDB_APIKEY}
25+ RUN if [ -n "$PEERINGDB_APIKEY" ]; then /ixgen/ixgen -buildcache; else echo "Skipping buildcache (no API key provided)"; fi
2326LABEL maintainer="Joerg Kost <jk@ip-clear.de>"
2427
You can’t perform that action at this time.
0 commit comments