-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
54 lines (39 loc) · 1.52 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
53
54
FROM ubuntu:22.04 as base
FROM base as builder
ARG TARGETPLATFORM
ENV CODABIX_SETUP_FILE=/tmp/codabix.setup
ENV VERSION=1.5.34
ENV RELEASE_DATE=2024-11-14
RUN apt-get update && apt-get install -y \
curl
RUN mkdir -p /home/scripts/
COPY ./scripts/download.sh /home/scripts/download.sh
RUN chmod +x /home/scripts/download.sh \
&& /home/scripts/download.sh -p "${TARGETPLATFORM}" -v "${VERSION}" -d "${RELEASE_DATE}" -o "${CODABIX_SETUP_FILE}"
COPY ./scripts/extract.sh /home/scripts/extract.sh
RUN chmod +x /home/scripts/extract.sh \
&& /home/scripts/extract.sh "${CODABIX_SETUP_FILE}"
FROM base
# 'iputils-ping' is required for sending ping requests using the Script API.
# 'ca-certificates' is required to install trusted public root CAs
# ("certificate authorities used by the Debian infrastructure and those shipped with Mozilla's browsers").
RUN apt-get update && apt-get install -y \
libicu70 \
libssl3 \
iputils-ping \
ca-certificates \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/traeger/codabix \
&& mkdir -p /home/scripts
COPY --from=builder /tmp/codabix/ /opt/traeger/codabix/
COPY ./scripts/start.sh /home/scripts
RUN ln -sf /opt/traeger/codabix/codabix /bin/codabix \
&& chmod +x /home/scripts/start.sh
EXPOSE 8181
RUN groupadd -g 999 codabix && \
useradd -m -d /home/codabix -r -u 999 -g codabix codabix
RUN mkdir /home/codabix/data && chown -R 999:999 /home/codabix
VOLUME /home/codabix/data
USER codabix
ENTRYPOINT [ "/home/scripts/start.sh" ]