-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 854 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
36
ARG BASE_IMG=rust
ARG BASE_IMG_VERSION=1.77.2-slim-bookworm
FROM $BASE_IMG:$BASE_IMG_VERSION
ARG BASE_IMG
ARG BASE_IMG_VERSION
ARG KSUNAMI_VERSION
LABEL base.image=$BASE_IMG:$BASE_IMG_VERSION \
name=ksunami \
version=$KSUNAMI_VERSION \
description="Produce constant, configurable, cyclical waves of Kafka Records" \
repository="https://github.com/kafkesc/ksunami" \
homepage="https://github.com/kafkesc/ksunami" \
license="MIT OR Apache-2.0"
ENV BUILD_DEPS "tcl-dev libssl-dev libsasl2-dev"
# Setup
RUN \
apt update && \
apt install -y ${BUILD_DEPS}
# Build
RUN \
cargo install --version "${KSUNAMI_VERSION#v}" ksunami
# Cleanup
RUN \
rm -rf /usr/local/cargo/registry && \
apt remove --purge -y ${BUILD_DEPS} && \
apt autoremove -y && \
apt autoclean -y && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["ksunami"]