mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-04-30 22:02:35 +08:00
feat: add step to compile duckdb for Alpine image
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -8,4 +8,18 @@ RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env
|
|||||||
RUN npm config set unsafe-perm true && npm ci && npm run build && npm run build:docs && npm prune --production
|
RUN npm config set unsafe-perm true && npm ci && npm run build && npm run build:docs && npm prune --production
|
||||||
RUN apk del .build-deps
|
RUN apk del .build-deps
|
||||||
|
|
||||||
|
# As no pre-built binaries of duckdb can be found for Alpine (musl based),
|
||||||
|
# a rebuild of duckdb package is need.
|
||||||
|
#
|
||||||
|
# Library used by the event-replay based on parquet files.
|
||||||
|
ARG DUCKDB_VERSION=0.8.1
|
||||||
|
WORKDIR /duckdb
|
||||||
|
RUN apk add --no-cache --virtual .duckdb-build-deps python3 git g++ make
|
||||||
|
RUN git clone https://github.com/duckdb/duckdb.git -b v${DUCKDB_VERSION} --depth 1 \
|
||||||
|
&& cd duckdb/tools/nodejs \
|
||||||
|
&& ./configure && make all
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm uninstall duckdb && npm install /duckdb/duckdb/tools/nodejs
|
||||||
|
RUN apk del .duckdb-build-deps
|
||||||
|
|
||||||
CMD ["node", "./lib/index.js"]
|
CMD ["node", "./lib/index.js"]
|
||||||
|
|||||||
Reference in New Issue
Block a user