Merge pull request #12002 from nocodb/chore/docker-build-issue

chore: Revert Dockerfile changes since it's breaking arm/v7 build
This commit is contained in:
Pranav C
2025-07-30 15:41:44 +05:30
committed by GitHub

View File

@@ -1,46 +1,44 @@
# syntax=docker/dockerfile:1
####################
###########
# Litestream Builder
####################
FROM golang:bookworm AS lt-builder
###########
FROM golang:bullseye AS lt-builder
WORKDIR /usr/src/
# Install buildtime dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
gcc \
RUN apt-get update && apt-get install -y \
git \
libc6-dev \
make \
gcc \
libc-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Build litestream
RUN git clone https://github.com/benbjohnson/litestream.git litestream\
&& cd litestream \
&& go install ./cmd/litestream \
&& cp $GOPATH/bin/litestream /usr/local/bin/litestream
# build litestream
RUN git clone https://github.com/benbjohnson/litestream.git litestream
RUN cd litestream && go install ./cmd/litestream
RUN cp $GOPATH/bin/litestream /usr/src/lt
################
# NocoDB Builder
################
###########
# Builder
###########
FROM node:22-slim AS builder
WORKDIR /usr/src/app
# Install node-gyp dependencies and other build tools
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
g++ \
libssl-dev \
make \
python-is-python3 \
# Install dependencies required for node-gyp and other build tools
RUN apt-get update && apt-get install -y \
python3 \
python3-distutils \
python-is-python3 \
make \
g++ \
libssl-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN python3 --version && python --version
# Install pnpm
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
# Copy application dependency manifests to the container image
# Copy application dependency manifests to the container image.
COPY --link ./package.json ./package.json
COPY --link ./docker/main.js ./docker/main.js
COPY --link ./docker/start-litestream.sh /usr/src/appEntry/start.sh
@@ -56,9 +54,9 @@ RUN pnpm install --prod --shamefully-hoist \
&& rm -rf ./node_modules/sqlite3/deps \
&& chmod +x /usr/src/appEntry/start.sh
########
##########
# Runner
########
##########
FROM node:22-slim
WORKDIR /usr/src/app
@@ -72,18 +70,17 @@ ENV LITESTREAM_S3_SKIP_VERIFY=false \
NODE_ENV=production \
PORT=8080
# Install runtime dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
ca-certificates `# required by wget for HTTPS support` \
curl \
# Install additional runtime dependencies
RUN apt-get update && apt-get install -y \
dumb-init \
wget `# for convenience of downstream users` \
curl \
wget \
&& curl -L "https://github.com/TomWright/dasel/releases/download/v2.8.1/dasel_linux_$(dpkg --print-architecture)" -o /usr/local/bin/dasel \
&& chmod +x /usr/local/bin/dasel \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy litestream binary and config file
COPY --link --from=lt-builder /usr/local/bin/litestream /usr/local/bin/litestream
COPY --link --from=lt-builder /usr/src/lt /usr/local/bin/litestream
COPY --link ./docker/litestream.yml /etc/litestream.yml
# Copy production code & main entry file
@@ -93,5 +90,6 @@ COPY --link --from=builder /usr/src/appEntry/ /usr/src/appEntry/
EXPOSE 8080
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Start NocoDB
# Start Nocodb
CMD ["/usr/src/appEntry/start.sh"]