| 1 |
# SPDX-FileCopyrightText: 2025 The Pion community <https://pion.ly> |
| 2 |
# SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
FROM golang:1.25-bookworm AS builder |
| 5 |
WORKDIR /src |
| 6 |
|
| 7 |
# Copy the entire repo so local changes to pion/ice are included. |
| 8 |
COPY . . |
| 9 |
|
| 10 |
WORKDIR /src/examples/nat-rules |
| 11 |
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o /tmp/nat-rules-demo . |
| 12 |
|
| 13 |
FROM debian:bookworm-slim |
| 14 |
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && \ |
| 15 |
rm -rf /var/lib/apt/lists/* |
| 16 |
|
| 17 |
COPY --from=builder /tmp/nat-rules-demo /usr/local/bin/nat-rules-demo |
| 18 |
|
| 19 |
ENTRYPOINT ["nat-rules-demo"] |