Skip to content

Commit 3a2e1ea

Browse files
authored
build: switch to bullseye image, pull duckdb binary (#1748)
1 parent a490d67 commit 3a2e1ea

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

Dockerfile

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
FROM node:18-alpine
1+
FROM node:18-bullseye
22

33
WORKDIR /app
44
COPY . .
5+
COPY --from=qldrsc/duckdb /usr/local/bin/duckdb /bin/duckdb
56

6-
RUN apk add --no-cache --virtual .build-deps alpine-sdk python3 git openjdk8-jre cmake
7+
RUN apt-get update && \
8+
apt-get install -y git openjdk-11-jre && \
9+
apt-get clean && \
10+
rm -rf /var/lib/apt/lists/*
711
RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env
812
RUN npm ci && npm run build && npm run build:docs && npm prune --production
9-
RUN apk del .build-deps
10-
11-
# As no pre-built binaries of duckdb can be found for Alpine (musl based),
12-
# a rebuild of duckdb package is need.
13-
#
14-
# Library used by the event-replay based on parquet files.
15-
ARG DUCKDB_VERSION=0.8.1
16-
WORKDIR /duckdb
17-
RUN apk add --no-cache --virtual .duckdb-build-deps python3 git g++ make
18-
RUN git clone https://github.com/duckdb/duckdb.git -b v${DUCKDB_VERSION} --depth 1 \
19-
&& cd duckdb/tools/nodejs \
20-
&& ./configure && make all
21-
WORKDIR /app
22-
RUN npm uninstall duckdb && npm install /duckdb/duckdb/tools/nodejs
23-
RUN apk del .duckdb-build-deps
2413

2514
CMD ["node", "./lib/index.js"]

0 commit comments

Comments
 (0)