-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (51 loc) · 2.35 KB
/
Copy pathDockerfile
File metadata and controls
60 lines (51 loc) · 2.35 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
ARG teslamate_version=4.2.0
FROM teslamate/grafana:${teslamate_version} AS grafana
#---
FROM teslamate/teslamate:${teslamate_version}
ARG BUILD_ARCH
ARG BASHIO_VERSION=0.16.2
ARG S6_OVERLAY_VERSION=3.1.6.2
ENV \
DEBIAN_FRONTEND="noninteractive" \
LANG="C.UTF-8" \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
USER root
RUN \
set -x \
&& apt-get update && apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
jq \
nginx \
postgresql-client \
tzdata \
xz-utils \
&& S6_ARCH="${BUILD_ARCH}" \
&& if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; fi \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar xpJ -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar xpJ -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" | tar Jxp -C / \
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" | tar Jxp -C / \
&& mkdir -p /tmp/bashio \
&& curl -Ls "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar xz --strip 1 -C /tmp/bashio \
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& apt purge -y xz-utils \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -rf /var/lib/apt/lists/* /tmp/*
COPY rootfs /
COPY --from=grafana /dashboards /dashboards
COPY --from=grafana /dashboards_internal /dashboards
LABEL \
maintainer="Colin Seymour (https://github.com/lildude)" \
org.opencontainers.image.authors="Colin Seymour (https://github.com/lildude)" \
org.opencontainers.image.description="A self-hosted data logger for your Tesla." \
org.opencontainers.image.documentation="https://github.com/lildude/ha-addon-teslamate/blob/main/DOCS.md" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/lildude/ha-addon-teslamate/" \
org.opencontainers.image.title="Home Assistant Add-on: TeslaMate"
# S6-Overlay
ENTRYPOINT ["/init"]