-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
36 lines (30 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARG COUCHBASE_TAG=enterprise-7.2.3
FROM couchbase:${COUCHBASE_TAG}
# Configure apt-get for NodeJS
# Install NPM and NodeJS and jq, with apt-get cleanup
RUN apt-get update && \
apt-get install -yq ca-certificates curl gnupg jq && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=20 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -yq nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install couchbase-index-manager
RUN mkdir -p /npm-packages && \
npm config set prefix /npm-packages && \
npm install -g --unsafe-perm couchbase-index-manager-cli@2.1.2 && \
rm -rf /tmp/* /var/tmp/*
ENV PATH="/npm-packages/bin:$PATH"
# Copy startup scripts
COPY ./scripts/ /scripts/
COPY ./startup/ /startup/
# Configure default environment
ENV CB_DATARAM=512 CB_INDEXRAM=256 CB_SEARCHRAM=256 CB_ANALYTICSRAM=1024 CB_EVENTINGRAM=256 \
CB_SERVICES=kv,n1ql,index,fts CB_INDEXSTORAGE=forestdb \
CB_USERNAME=Administrator CB_PASSWORD=password
RUN mkdir /nodestatus
VOLUME /nodestatus
ENTRYPOINT ["/scripts/configure-node.sh"]