-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 1.19 KB
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
FROM golang:1.26-bookworm AS build
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
ARG VERSION="dev"
RUN apt-get update && apt-get -y install git
RUN go build -v -ldflags "-X main.version=${VERSION}" ./cmd/firecore
FROM ubuntu:24.04
ARG TARGETPLATFORM
# gettext-base is needed for envsubst
RUN apt-get update && apt-get -y install ca-certificates htop iotop sysstat strace lsof curl jq tzdata file gettext-base
RUN mkdir -p /app/ && \
export repository="https://github.com/grpc-ecosystem/grpc-health-probe/releases/download" && \
export version=$(curl -s https://api.github.com/repos/grpc-ecosystem/grpc-health-probe/releases/latest | jq -r .tag_name) && \
curl --fail-with-body -Lo /app/grpc_health_probe "$repository/$version/grpc_health_probe-$(echo $TARGETPLATFORM | sed 's|/|-|')" && \
chmod +x /app/grpc_health_probe
WORKDIR /app
COPY --from=build /app/firecore /app/firecore
ENV PATH="$PATH:/app"
COPY docker/motd /etc/motd
COPY docker/motd_reader /etc/motd_reader
COPY docker/99-firehose-core.sh /etc/profile.d/
COPY docker/scripts/ /app/
RUN chmod +x /app/reader-*
RUN echo ". /etc/profile.d/99-firehose-core.sh" > /root/.bash_aliases
ENTRYPOINT [ "/app/firecore" ]