Skip to content

Commit 0803b3a

Browse files
committed
strip debug symbols from azure iptables monitor
1 parent e7a87d6 commit 0803b3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.pipelines/build/scripts/azure-iptables-monitor.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ set -eux
44
[[ $OS =~ windows ]] && { echo "azure-iptables-monitor is not supported on Windows"; exit 1; }
55
FILE_EXT=''
66

7-
export CGO_ENABLED=0
7+
export CGO_ENABLED=0
88

99
mkdir -p "$OUT_DIR"/bin
1010
mkdir -p "$OUT_DIR"/files
1111

1212
pushd "$REPO_ROOT"/azure-iptables-monitor
1313
GOOS="$OS" go build -v -a -trimpath \
1414
-o "$OUT_DIR"/bin/azure-iptables-monitor"$FILE_EXT" \
15-
-ldflags "-X github.com/Azure/azure-container-networking/azure-iptables-monitor/internal/buildinfo.Version=$AZURE_IPTABLES_MONITOR_VERSION -X main.version=$AZURE_IPTABLES_MONITOR_VERSION" \
15+
-ldflags "-s -w -X github.com/Azure/azure-container-networking/azure-iptables-monitor/internal/buildinfo.Version=$AZURE_IPTABLES_MONITOR_VERSION -X main.version=$AZURE_IPTABLES_MONITOR_VERSION" \
1616
-gcflags="-dwarflocationlists=true" \
1717
.
1818
popd

azure-iptables-monitor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ARG OS
1515
ARG VERSION
1616
WORKDIR /azure-iptables-monitor
1717
COPY ./azure-iptables-monitor .
18-
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/iptables-monitor -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
18+
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/iptables-monitor -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
1919

2020
FROM mariner-core AS iptables
2121
RUN tdnf install -y iptables

0 commit comments

Comments
 (0)