diff --git a/Dockerfile.centos8 b/Dockerfile.centos8 index 5acf3f95..b63c2bcb 100644 --- a/Dockerfile.centos8 +++ b/Dockerfile.centos8 @@ -11,4 +11,4 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local COPY . /go/src/github.com/code-ready/machine-driver-libvirt WORKDIR /go/src/github.com/code-ready/machine-driver-libvirt -RUN go build -i -v -o /go/bin/crc-driver-libvirt ./cmd/machine-driver-libvirt +RUN go build -i -v -ldflags="-s -w" -o /go/bin/crc-driver-libvirt ./cmd/machine-driver-libvirt diff --git a/Dockerfile.ubuntu20.04 b/Dockerfile.ubuntu20.04 index 3533a7d5..618d0883 100644 --- a/Dockerfile.ubuntu20.04 +++ b/Dockerfile.ubuntu20.04 @@ -12,4 +12,4 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local COPY . /go/src/github.com/code-ready/machine-driver-libvirt WORKDIR /go/src/github.com/code-ready/machine-driver-libvirt -RUN go build -i -v -o /go/bin/crc-driver-libvirt ./cmd/machine-driver-libvirt +RUN go build -i -v -ldflags="-s -w" -o /go/bin/crc-driver-libvirt ./cmd/machine-driver-libvirt