-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmarklogic-server-centos:base
113 lines (87 loc) · 4.79 KB
/
marklogic-server-centos:base
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
###############################################################
#
# Copyright (c) 2022 MarkLogic Corporation
#
###############################################################
ARG BASE_IMAGE=marklogic-centos/marklogic-deps-centos:10-internal
FROM ${BASE_IMAGE} as builder
MAINTAINER [email protected]
###############################################################
# set build args
###############################################################
ARG ML_RPM=marklogic.rpm
ARG ML_USER="marklogic_user"
ARG ML_VERSION=10-internal
ARG ML_CONVERTERS=marklogic.converters
####################################################
# inject init, start and clustering scripts
###############################################################
COPY scripts/start-marklogic.sh /usr/local/bin/start-marklogic.sh
COPY scripts/join-cluster.sh /usr/local/bin/join-cluster.sh
###############################################################
# install MarkLogic server and sudo
###############################################################
COPY ${ML_RPM} /tmp/marklogic-server.rpm
RUN yum localinstall -y /tmp/marklogic-server.rpm \
&& rm /tmp/marklogic-server.rpm \
&& yum -y install sudo \
&& yum -y clean all
###############################################################
# Copy converters package
###############################################################
COPY ${ML_CONVERTERS} ./converters.rpm
###############################################################
# create system user
###############################################################
RUN adduser --gid users --uid 1000 ${ML_USER} && echo ${ML_USER}" ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
###############################################################
# second stage for flattening layers
###############################################################
FROM ${BASE_IMAGE}
COPY --from=builder / /
ARG ML_USER="marklogic_user"
ARG ML_VERSION=10-internal
###############################################################
# define docker labels
###############################################################
LABEL "Maintainer"="[email protected]"
LABEL "Name"="MarkLogic Server ${ML_VERSION}"
LABEL "Version"="1.0.0"
LABEL "com.marklogic"="MarkLogic"
LABEL "com.marklogic.release-type"="production"
LABEL "com.marklogic.release-version"="${ML_VERSION}"
LABEL "com.marklogic.license"="MarkLogic EULA"
LABEL "com.marklogic.license.description"="By subscribing to this product, you agree to the terms and conditions outlined in MarkLogic's End User License Agreement (EULA) here https://developer.marklogic.com/eula "
LABEL "com.marklogic.license.url"="https://developer.marklogic.com/eula"
LABEL "com.marklogic.version"="${ML_VERSION}"
LABEL "com.marklogic.description"="MarkLogic is the only Enterprise NoSQL database. It is a new generation database built with a flexible data model to store, manage, and search JSON, XML, RDF, and more - without sacrificing enterprise features such as ACID transactions, certified security, and backup and recovery. With these capabilities, MarkLogic is ideally suited for making heterogeneous data integration simpler and faster and for doing dynamic content delivery at massive scale. MarkLogic Developer redhat image includes all features but is limited to pre-production applications and use."
LABEL docker.cmd="docker run -it -p 7997-8010:7997-8010 -e MARKLOGIC_INIT=true -e MARKLOGIC_ADMIN_USERNAME=<INSERT USERNAME> -e MARKLOGIC_ADMIN_PASSWORD=<INSERT PASSWORD> -v ~/data:/var/opt/MarkLogic marklogicdb/marklogic-server-centos:${ML_VERSION}"
###############################################################
# set env vars
###############################################################
ENV MARKLOGIC_INSTALL_DIR=/opt/MarkLogic \
MARKLOGIC_DATA_DIR=/var/opt/MarkLogic \
MARKLOGIC_USER=${ML_USER} \
MARKLOGIC_PID_FILE=/var/run/MarkLogic.pid \
MARKLOGIC_UMASK=022 \
LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH:/opt/MarkLogic/lib \
MARKLOGIC_VERSION="${ML_VERSION}" \
MARKLOGIC_BOOTSTRAP_HOST=bootstrap \
MARKLOGIC_ADMIN_USERNAME_FILE=mldb_admin_user \
MARKLOGIC_ADMIN_PASSWORD_FILE=mldb_password_user
###############################################################
# expose MarkLogic server ports
###############################################################
EXPOSE 25 7997-8010
###############################################################
# set system user
###############################################################
USER ${ML_USER}
###############################################################
# define volume for persistent MarkLogic server data
###############################################################
VOLUME /var/opt/MarkLogic
###############################################################
# set entrypoint
###############################################################
ENTRYPOINT ["/usr/local/bin/start-marklogic.sh"]