-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathDockerfile34.templ
50 lines (41 loc) · 1.87 KB
/
Dockerfile34.templ
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
FROM alpine:3.8
MAINTAINER Frank Celler <[email protected]>
ENV ARANGO_VERSION @VERSION@
ENV ARANGO_URL https://download.arangodb.com/arangodb34/DEBIAN/amd64
ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
RUN apk add --no-cache gnupg pwgen nodejs npm binutils && \
npm install -g foxx-cli && \
rm -rf /root/.npm
RUN gpg --batch --keyserver hkps://hkps.pool.sks-keyservers.net --recv-keys CD8CB0F1E0AD5B52E93F41E7EA93F5E56E751E9B
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 cd /tmp && \
wget ${ARANGO_SIGNATURE_URL} && \
wget ${ARANGO_PACKAGE_URL} && \
gpg --verify ${ARANGO_PACKAGE}.asc && \
ar x ${ARANGO_PACKAGE} data.tar.gz && \
tar -C / -x -z -f data.tar.gz && \
sed -ri \
-e 's!127\.0\.0\.1!0.0.0.0!g' \
-e 's!^(file\s*=\s*).*!\1 -!' \
-e 's!^\s*uid\s*=.*!!' \
/etc/arangodb3/arangod.conf && \
echo chgrp -R 0 /var/lib/arangodb3 /var/lib/arangodb3-apps && \
echo chmod -R 775 /var/lib/arangodb3 /var/lib/arangodb3-apps && \
rm -f /usr/bin/foxx && \
rm -f ${ARANGO_PACKAGE}* data.tar.gz
# 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-foxx.sh /usr/bin/foxx
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
# standard port
EXPOSE 8529
CMD ["arangod"]