-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathContainerfile
More file actions
88 lines (79 loc) · 3.08 KB
/
Copy pathContainerfile
File metadata and controls
88 lines (79 loc) · 3.08 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>
#
# SPDX-License-Identifier: MIT
ARG \
BASE_IMAGE
FROM ${BASE_IMAGE}
LABEL \
org.opencontainers.image.title="Grafana" \
org.opencontainers.image.description="Analytics and monitoring platform" \
org.opencontainers.image.url="https://hub.docker.com/r/nfrastack/grafana" \
org.opencontainers.image.documentation="https://github.com/nfrastack/container-grafana/blob/main/README.md" \
org.opencontainers.image.source="https://github.com/nfrastack/container-grafana.git" \
org.opencontainers.image.authors="Nfrastack <code@nfrastack.com>" \
org.opencontainers.image.vendor="Nfrastack <https://www.nfrastack.com>" \
org.opencontainers.image.licenses="MIT"
ARG \
GRAFANA_VERSION="v13.0.1+security-01" \
GRAFANA_REPO_URL="https://github.com/grafana/grafana"
COPY CHANGELOG.md /usr/src/container/CHANGELOG.md
COPY LICENSE /usr/src/container/LICENSE
COPY README.md /usr/src/container/README.md
ENV \
IMAGE_NAME="nfrastack/grafana" \
IMAGE_REPO_URL="https://github.com/nfrastack/container-grafana/"
EXPOSE 3000
RUN echo "" && \
BUILD_ENV=" \
10-nginx/ENABLE_NGINX=FALSE \
10-nginx/NGINX_ENABLE_CREATE_SAMPLE_HTML=FALSE \
10-nginx/NGINX_SITE_ENABLED=grafana \
" \
&& \
GRAFANA_BUILD_DEPS_ALPINE=" \
gcc \
make \
musl-dev \
nodejs \
npm \
# yarn \
" \
&& \
GRAFANA_RUN_DEPS_ALPINE=" \
chromium \
libc6-compat \
ttf-opensans \
udev \
" \
&& \
\
source /container/base/functions/container/build && \
container_build_log image && \
create_user grafana 472 grafana 472 /usr/share/grafana && \
package update && \
package upgrade && \
package install \
GRAFANA_BUILD_DEPS \
GRAFANA_RUN_DEPS \
&& \
package build go && \
\
npm install -g yarn && \
clone_git_repo "${GRAFANA_REPO_URL}" "${GRAFANA_VERSION}" /usr/src/grafana && \
make && \
strip /usr/src/grafana/bin/linux/$(container_info arch alt)/grafana && \
cp -aR \
/usr/src/grafana/bin/linux/$(container_info arch alt)/grafana \
/usr/local/sbin && \
mkdir -p /usr/share/grafana && \
cp -aR \
/usr/src/grafana/conf \
/usr/src/grafana/public \
/usr/share/grafana && \
chown -R grafana:grafana /usr/share/grafana && \
container_build_log add "Grafana" "${GRAFANA_VERSION}" "${GRAFANA_REPO_URL}" && \
npm uninstall -g yarn && \
package remove \
GRAFANA_BUILD_DEPS && \
package cleanup
COPY rootfs /