From 94281fa2eec0eb9c39e03b2ddb9d0153e49d2035 Mon Sep 17 00:00:00 2001 From: gregnuj Date: Fri, 26 Jan 2024 14:17:22 -0600 Subject: [PATCH] move static libs to dockerfile --- alpine.Dockerfile | 16 ++++++++++------ bin/install-rocksdb | 1 - builds/celestia.1.3.0.alpine.sh | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/alpine.Dockerfile b/alpine.Dockerfile index d1260f0..08a7e57 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -7,15 +7,20 @@ FROM golang:${GO_VERSION}-alpine as base RUN set -eu && \ apk update && \ apk add --no-cache \ - ca-certificates \ - linux-headers \ - build-base \ - musl-dev \ bash \ bison \ + build-base \ + ca-certificates \ curl \ + git \ gcompat \ - git + linux-headers \ + lz4-static \ + musl-dev \ + perl \ + snappy-static \ + zlib-static \ + zstd-static COPY ./bin/install-mimalloc ./bin/install-wasmvm ./bin/install-rocksdb /usr/local/bin/ @@ -88,7 +93,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ export VERSION=GIT_VERSION="$(git describe --tags --dirty --always)" && \ export DENOM=${DENOM:-"u$(echo ${APP_NAME} | head -c 4)"} && \ export GOWORK=off && \ - ls -al && \ eval ${BUILD_COMMAND} # verify static binary diff --git a/bin/install-rocksdb b/bin/install-rocksdb index 2f406b0..143bac4 100755 --- a/bin/install-rocksdb +++ b/bin/install-rocksdb @@ -10,7 +10,6 @@ if [ -n "${ROCKSDB_VERSION}" ]; then https://github.com/facebook/rocksdb ./ # busybox install doesn't support -C flag sed -i "s/install -C/install/g" Makefile - apk add zstd-static lz4-static zlib-static snappy-static make -j$(nproc) static_lib make install-static else diff --git a/builds/celestia.1.3.0.alpine.sh b/builds/celestia.1.3.0.alpine.sh index eb29302..0f5e59c 100755 --- a/builds/celestia.1.3.0.alpine.sh +++ b/builds/celestia.1.3.0.alpine.sh @@ -20,7 +20,7 @@ docker buildx build "." -f "${IMAGE}.Dockerfile" \ --build-arg "BIN_NAME=${NAME}-appd" \ --build-arg "BUILD_COMMAND=make install" \ --build-arg "BUILD_TAGS=netgo ledger muslc" \ - --build-arg "CHECK_STATICALLY=false" \ + #--build-arg "CHECK_STATICALLY=false" \ --build-arg "COSMOS_BUILD_OPTIONS=" \ --build-arg "GIT_TAG=v${TAG}" \ --build-arg "GIT_REPO=${REPO}" \