-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
82 lines (69 loc) · 3.07 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
## -*- docker-image-name: "docker-crate" -*-
#
# Crate Dockerfile
# https://github.com/crate/docker-crate
#
FROM alpine:3.8
RUN addgroup -g 1000 -S crate \
&& adduser -u 1000 -G crate -h /crate -S crate
# install crate
RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
curl \
coreutils \
&& apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-3.1.6.tar.gz \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-3.1.6.tar.gz.asc \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 90C23FC6585BC0717F8FBFC37FAAE51A06F6EAEB \
&& gpg --batch --verify crate-3.1.6.tar.gz.asc crate-3.1.6.tar.gz \
&& rm -rf "$GNUPGHOME" crate-3.1.6.tar.gz.asc \
&& tar -xf crate-3.1.6.tar.gz -C /crate --strip-components=1 \
&& rm crate-3.1.6.tar.gz \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& apk del .build-deps
# install crash
RUN apk add --no-cache --virtual .build-deps \
gnupg \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crash_standalone_0.24.2\
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crash_standalone_0.24.2.asc \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 90C23FC6585BC0717F8FBFC37FAAE51A06F6EAEB \
&& gpg --batch --verify crash_standalone_0.24.2.asc crash_standalone_0.24.2 \
&& rm -rf "$GNUPGHOME" crash_standalone_0.24.2.asc \
&& mv crash_standalone_0.24.2 /usr/local/bin/crash \
&& chmod +x /usr/local/bin/crash \
&& apk del .build-deps
ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
# This healthcheck indicates if a CrateDB node is up and running. It will fail
# if we cannot get any response from the CrateDB (connection refused, timeout
# etc). If any response is received (regardless of http status code) we
# consider the node as running.
HEALTHCHECK --timeout=30s --interval=30s CMD curl --max-time 25 $(hostname):4200 || exit 1
RUN mkdir -p /data/data /data/log
VOLUME /data
WORKDIR /data
# http: 4200 tcp
# transport: 4300 tcp
# postgres protocol ports: 5432 tcp
EXPOSE 4200 4300 5432
LABEL maintainer="Crate.io <office@crate.io>" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="2019-02-07T11:22:48.301309289+00:00" \
org.label-schema.name="crate" \
org.label-schema.description="CrateDB is a distributed SQL database handles massive amounts of machine data in real-time." \
org.label-schema.url="https://crate.io/products/cratedb/" \
org.label-schema.vcs-url="https://github.com/crate/docker-crate" \
org.label-schema.vendor="Crate.io" \
org.label-schema.version="3.1.6"
COPY --chown=1000:0 config/crate.yml /crate/config/crate.yml
COPY --chown=1000:0 config/log4j2.properties /crate/config/log4j2.properties
COPY docker-entrypoint_3.1.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["crate"]