-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_gr
34 lines (25 loc) · 1.13 KB
/
Dockerfile_gr
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
FROM alpine
ARG BUILD_VERSION=0.0.1
ARG BUILD_TIME=2022-12-13T000000Z
LABEL org.opencontainers.image.created=$BUILD_TIME \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.source="https://github.com/hrshadhin/ot-recoder" \
org.opencontainers.image.url="https://github.com/hrshadhin/ot-recoder" \
org.opencontainers.image.name="ot-recorder" \
org.opencontainers.image.title="OwnTracks Recorder" \
org.opencontainers.image.description="Store and access data published by OwnTracks apps"
# Install/Create dependent tools,location,directory
RUN apk add --no-cache curl tini tzdata && \
rm -rf /var/cache/apk/* && \
mkdir /persist && chown -R 1000:1000 /persist
ENV ZONEINFO=/usr/share/zoneinfo
## Open port
EXPOSE 8000
## Perform any further action as an unprivileged location.
USER 1000
WORKDIR /app
COPY --chmod=0755 ot-recorder ot-recorder
HEALTHCHECK --interval=1m --timeout=1s --retries=3 --start-period=2s CMD ["curl", "--fail", "http://localhost:8000/health"]
## Run the compiled binary.
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/app/ot-recorder","--config","/app/config.yml", "serve"]