Skip to content

Commit

Permalink
move static libs to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnuj committed Jan 26, 2024
1 parent 0907c04 commit 94281fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
16 changes: 10 additions & 6 deletions alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion bin/install-rocksdb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builds/celestia.1.3.0.alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand Down

0 comments on commit 94281fa

Please sign in to comment.