forked from influxdata/influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (43 loc) · 1.1 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
FROM ubuntu:20.04 AS dbuild
ENV DEBIAN_FRONTEND noninteractive
# Needed for Yarn steps to veryify the keys
RUN apt update
RUN apt install --yes curl gnupg2
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Now update index with Yarn
RUN apt update
RUN apt install --yes \
cargo \
git \
golang \
libclang-dev \
llvm-dev \
make \
nodejs \
protobuf-compiler \
ragel \
rustc \
yarn
FROM dbuild AS dshell
ARG USERID=1000
RUN adduser --quiet --home /code --uid ${USERID} --disabled-password --gecos "" influx
USER influx
ENTRYPOINT [ "/bin/bash" ]
FROM dbuild AS dbuild-all
COPY . /code
WORKDIR /code
RUN make
##
# InfluxDB Image (Monolith)
##
FROM debian:stretch-slim AS influx
COPY --from=dbuild-all /code/bin/linux/influxd /usr/bin/influxd
EXPOSE 8086
ENTRYPOINT [ "/usr/bin/influxd" ]
##
# InfluxDB UI Image
##
FROM nginx:alpine AS ui
EXPOSE 80
COPY --from=dbuild-all /code/ui/build /usr/share/nginx/html