-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDockerfile
63 lines (52 loc) · 2.19 KB
/
Dockerfile
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
FROM debian:stretch
MAINTAINER Frank Celler <info@arangodb.com>
ENV ARCHITECTURE amd64
ENV DEB_PACKAGE_VERSION 1
ENV ARANGO_VERSION 3.3.20
ENV ARANGO_URL https://download.arangodb.com/arangodb33/Debian_9.0
ENV ARANGO_PACKAGE arangodb3-${ARANGO_VERSION}-${DEB_PACKAGE_VERSION}_${ARCHITECTURE}.deb
ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARCHITECTURE}/${ARANGO_PACKAGE}
ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
RUN apt-get update && \
apt-get install -y --no-install-recommends gpg dirmngr \
&& \
rm -rf /var/lib/apt/lists/*
RUN gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv-keys CD8CB0F1E0AD5B52E93F41E7EA93F5E56E751E9B
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libjemalloc1 \
ca-certificates \
pwgen \
curl \
numactl \
&& \
rm -rf /var/lib/apt/lists/*
RUN mkdir /docker-entrypoint-initdb.d
# see
# https://docs.arangodb.com/latest/Manual/Administration/Configuration/Endpoint.html
# https://docs.arangodb.com/latest/Manual/Administration/Configuration/Logging.html
RUN curl --fail -O ${ARANGO_SIGNATURE_URL} && \
curl --fail -O ${ARANGO_PACKAGE_URL} && \
gpg --verify ${ARANGO_PACKAGE}.asc && \
(echo arangodb3 arangodb3/password password test | debconf-set-selections) && \
(echo arangodb3 arangodb3/password_again password test | debconf-set-selections) && \
DEBIAN_FRONTEND="noninteractive" dpkg -i ${ARANGO_PACKAGE} && \
rm -rf /var/lib/arangodb3/* && \
sed -ri \
-e 's!127\.0\.0\.1!0.0.0.0!g' \
-e 's!^(file\s*=).*!\1 -!' \
-e 's!^\s*uid\s*=.*!!' \
/etc/arangodb3/arangod.conf \
&& chgrp 0 /var/lib/arangodb3 /var/lib/arangodb3-apps \
&& chmod 775 /var/lib/arangodb3 /var/lib/arangodb3-apps \
&& \
rm -f ${ARANGO_PACKAGE}*
# Note that Openshift runs containers by default with a random UID and GID 0.
# We need that the database and apps directory are writable for this config.
# retain the database directory and the Foxx Application directory
VOLUME ["/var/lib/arangodb3", "/var/lib/arangodb3-apps"]
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# standard port
EXPOSE 8529
CMD ["arangod"]