Repository navigation
Expand file tree
/
Copy pathContainerfile.pkg
More file actions
53 lines (44 loc) · 2 KB
/
Copy pathContainerfile.pkg
File metadata and controls
53 lines (44 loc) · 2 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.pkg.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base-exec:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PKG_NAME="clickhouse"
ARG PACKAGES="clickhouse ca_root_nss"
LABEL org.opencontainers.image.title="ClickHouse" \
org.opencontainers.image.description="Fast open-source column-oriented database management system for real-time analytical reporting." \
org.opencontainers.image.source="https://github.com/daemonless/clickhouse" \
org.opencontainers.image.url="https://clickhouse.com/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Databases" \
io.daemonless.port="8123" \
io.daemonless.volumes="/var/db/clickhouse" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.pkg-source="pkg" \
io.daemonless.packages="${PACKAGES}" \
io.daemonless.pkg-name="${PKG_NAME}"
# Install clickhouse. The port lists python312 and bash as run deps, but the
# binary never calls either (server, client, clickhouse-local verified): 140 MB.
RUN pkg update && \
pkg install -y ${PACKAGES} && \
mkdir -p /app /defaults /var/db/clickhouse /var/log/clickhouse /var/run/clickhouse \
/usr/local/etc/clickhouse-server/config.d /usr/local/etc/clickhouse-server/users.d && \
pkg query '%v' ${PKG_NAME} > /app/version && \
pkg delete -fy python312 bash && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Copy root filesystem
COPY root/ /
RUN chmod +x /daemonless/libexec/clickhouse /daemonless/init.d/*
CMD ["/daemonless/libexec/clickhouse"]
# Set permissions
RUN chmod +x /healthz
# Expose HTTP (8123) and native client (9000)
EXPOSE 8123 9000
# Volumes
VOLUME /var/db/clickhouse