forked from apache/incubator-horaedb-meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (23 loc) · 829 Bytes
/
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
## Builder
ARG GOLANG_VERSION=1.19.5
FROM golang:${GOLANG_VERSION}-bullseye as build
# cache mounts below may already exist and owned by root
USER root
RUN apt update && apt install --yes gcc g++ libssl-dev pkg-config cmake && rm -rf /var/lib/apt/lists/*
COPY . /ceresmeta
WORKDIR /ceresmeta
RUN go build -o ceresmeta ./cmd/meta/...
## CeresMeta
FROM ubuntu:20.04
RUN useradd -m -s /bin/bash ceres
RUN apt update && \
apt install --yes curl gdb iotop cron vim less net-tools && \
apt clean
COPY --from=build /ceresmeta/ceresmeta /usr/bin/ceresmeta-server
RUN chmod +x /usr/bin/ceresmeta-server
COPY ./docker/entrypoint.sh /entrypoint.sh
COPY ./config/example-standalone.toml /etc/ceresmeta/ceresmeta.toml
COPY ./docker/tini /tini
RUN chmod +x /tini
ARG USER ceres
ENTRYPOINT ["/tini", "--", "/entrypoint.sh"]