From b962138bf8f465fa027fbe24f223c8e8717de7c9 Mon Sep 17 00:00:00 2001 From: Andrew Gouin Date: Mon, 6 Nov 2023 12:09:55 -0700 Subject: [PATCH] get it building --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78e3f232..19510022 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,8 @@ RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \ fi; \ make -j$(nproc) static_lib +RUN apk add --update --no-cache snappy-static zlib-static bzip2-static lz4-static zstd-static + WORKDIR /workspace # Copy the Go Modules manifests COPY go.mod go.mod @@ -52,8 +54,7 @@ RUN set -eux;\ fi;\ export GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"';\ export LD_LIBRARY_PATH=/rocksdb CGO_CFLAGS="-I/rocksdb/include" CGO_LDFLAGS="-L/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd";\ - go get github.com/tecbot/gorocksdb;\ - go build -tags 'rocksdb pebbledb' -ldflags "-X github.com/strangelove-ventures/cosmos-operator/internal/version.version=$VERSION $LDFLAGS" -a -o manager . + CGO_CFLAGS="-I/rocksdb/include" CGO_LDFLAGS="-L/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd" go build -tags 'rocksdb pebbledb' -ldflags "-X github.com/strangelove-ventures/cosmos-operator/internal/version.version=$VERSION $LDFLAGS" -a -o manager . # Build final image from scratch FROM scratch