"Fossies" - the Fresh Open Source Software Archive

Member "nocodb-0.83.5/packages/nocodb/Dockerfile" (27 Nov 2021, 1732 Bytes) of package /linux/misc/nocodb-0.83.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ###########
    2 # Litestream Builder
    3 ###########
    4 FROM golang:alpine3.14 as lt-builder
    5 
    6 WORKDIR /usr/src/
    7 
    8 RUN apk add --no-cache git make musl-dev gcc
    9 
   10 # build litestream
   11 RUN git clone https://github.com/benbjohnson/litestream.git litestream
   12 RUN cd litestream ; go install ./cmd/litestream
   13 
   14 RUN cp $GOPATH/bin/litestream /usr/src/lt
   15 
   16 
   17 
   18 ###########
   19 # Builder
   20 ###########
   21 FROM node:12 as builder
   22 WORKDIR /usr/src/app
   23 
   24 # Copy application dependency manifests to the container image.
   25 # A wildcard is used to ensure both package.json AND package-lock.json are copied.
   26 # Copying this separately prevents re-running npm ci on every code change.
   27 COPY ./package*.json ./
   28 COPY ./docker/main.js ./docker/main.js
   29 #COPY ./docker/start.sh /usr/src/appEntry/start.s
   30 COPY ./docker/start-litestream.sh /usr/src/appEntry/start.sh
   31 
   32 # install production dependencies,
   33 # reduce node_module size with modclean & removing sqlite deps,
   34 # package built code into app.tar.gz & add execute permission to start.sh
   35 RUN npm ci --production --quiet \
   36     && npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**" --run  \
   37     && rm -rf ./node_modules/sqlite3/deps \
   38     && tar -czf ../appEntry/app.tar.gz ./* \
   39     && chmod +x /usr/src/appEntry/start.sh
   40 
   41 ##########
   42 # Runner
   43 ##########
   44 FROM alpine:3.12
   45 WORKDIR /usr/src/app
   46 
   47 ENV NC_DOCKER 0.6
   48 ENV PORT 8080
   49 ENV NC_TOOL_DIR=/usr/app/data/
   50 
   51 RUN apk --update --no-cache add \
   52     nodejs \
   53     tar
   54 
   55 # Copy litestream binary build
   56 COPY  --from=lt-builder /usr/src/lt /usr/src/appEntry/litestream
   57 # Copy packaged production code & main entry file
   58 COPY --from=builder /usr/src/appEntry/ /usr/src/appEntry/
   59 
   60 EXPOSE 8080
   61 
   62 # Start Nocodb
   63 ENTRYPOINT ["sh", "/usr/src/appEntry/start.sh"]