-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathDockerfile
53 lines (41 loc) · 1.27 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
################################################################################
# Gazette broker image.
FROM ubuntu:24.04 AS broker
ARG TARGETARCH
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY ${TARGETARCH}/gazette ${TARGETARCH}/gazctl /usr/local/bin
# Run as non-privileged "gazette" user.
RUN useradd gazette --create-home --shell /usr/sbin/nologin
USER gazette
WORKDIR /home/gazette
################################################################################
# Gazette examples image.
FROM ubuntu:24.04 AS examples
ARG TARGETARCH
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
ca-certificates \
curl \
librocksdb8.9 \
libsqlite3-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy binaries to the image.
COPY \
${TARGETARCH}/bike-share \
${TARGETARCH}/chunker \
${TARGETARCH}/counter \
${TARGETARCH}/gazctl \
${TARGETARCH}/integration.test \
${TARGETARCH}/summer \
${TARGETARCH}/wordcountctl \
/usr/local/bin/
# Run as non-privileged "gazette" user.
RUN useradd gazette --create-home --shell /usr/sbin/nologin
USER gazette
WORKDIR /home/gazette