Browse Source

chore: make Dockerfiles more idiomatic

pull/8494/head
Salim B 6 months ago
parent
commit
75bfcbbfbc
No known key found for this signature in database
GPG Key ID: C7657487017FE6D5
  1. 11
      packages/nocodb/Dockerfile
  2. 12
      packages/nocodb/Dockerfile.local
  3. 12
      packages/nocodb/litestream/Dockerfile

11
packages/nocodb/Dockerfile

@ -1,7 +1,9 @@
# syntax=docker/dockerfile:1
###########
# Litestream Builder
###########
FROM golang:alpine3.18 as lt-builder
FROM golang:alpine3.19 as lt-builder
WORKDIR /usr/src/
@ -9,12 +11,9 @@ RUN apk add --no-cache git make musl-dev gcc
# build litestream
RUN git clone https://github.com/benbjohnson/litestream.git litestream
RUN cd litestream ; go install ./cmd/litestream
RUN cd litestream && go install ./cmd/litestream
RUN cp $GOPATH/bin/litestream /usr/src/lt
###########
# Builder
###########
@ -63,7 +62,7 @@ ENV LITESTREAM_S3_SKIP_VERIFY=false \
NODE_ENV=production \
PORT=8080
RUN apk --update --no-cache add \
RUN apk add --update --no-cache \
nodejs \
dumb-init

12
packages/nocodb/Dockerfile.local

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
###########
# Builder
###########
@ -36,12 +38,12 @@ RUN pnpm install --prod --shamefully-hoist --reporter=silent \
FROM alpine:3.19
WORKDIR /usr/src/app
ENV NC_DOCKER 0.6
ENV NODE_ENV production
ENV PORT 8080
ENV NC_TOOL_DIR=/usr/app/data/
ENV NC_DOCKER=0.6 \
NC_TOOL_DIR=/usr/app/data/ \
NODE_ENV=production \
PORT=8080
RUN apk --update --no-cache add \
RUN apk add --update --no-cache \
nodejs \
dumb-init \
curl \

12
packages/nocodb/litestream/Dockerfile

@ -1,4 +1,6 @@
FROM golang:alpine3.18 as lt
# syntax=docker/dockerfile:1
FROM golang:alpine3.19 as lt
WORKDIR /usr/src/
@ -6,12 +8,10 @@ RUN apk add --no-cache git make musl-dev gcc
# build litestream
RUN git clone https://github.com/benbjohnson/litestream.git litestream
RUN cd litestream ; go install ./cmd/litestream
RUN cd litestream && go install ./cmd/litestream
RUN cp $GOPATH/bin/litestream /usr/src/lt
FROM node:18.19.1-alpine as builder
WORKDIR /usr/src/app
@ -36,6 +36,7 @@ RUN pnpm dlx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,ex
RUN rm -rf ./node_modules/sqlite3/deps
RUN chmod +x /usr/src/appEntry/start.sh
FROM alpine:3.19
#WORKDIR /usr/src/
@ -55,7 +56,6 @@ FROM alpine:3.19
#RUN git clone https://github.com/benbjohnson/litestream.git litestream
#RUN cd litestream ; go install ./cmd/litestream
# Bug fix for segfault ( Convert PT_GNU_STACK program header into PT_PAX_FLAGS )
#RUN apk --update --no-cache add paxctl \
# && paxctl -cm $(which node)
@ -79,7 +79,7 @@ ENV LITESTREAM_S3_SKIP_VERIFY=false \
#COPY ./docker/main.js ./docker/main.js
#COPY ./package.json ./
RUN apk --update --no-cache add \
RUN apk add --update --no-cache \
nodejs \
tar

Loading…
Cancel
Save