-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-CI
More file actions
51 lines (41 loc) · 1.48 KB
/
Dockerfile-CI
File metadata and controls
51 lines (41 loc) · 1.48 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
ARG BASE_IMAGE=alpine:3.21
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.authors="haxwithaxe W3AXE"
LABEL org.opencontainers.image.description="HamClock by WBØOEW in a Docker container"
LABEL org.opencontainers.image.source="https://github.com/haxwithaxe/hamclock-docker"
ENV HOME=/hamclock
WORKDIR /
# Install prerequisites
RUN apk update && apk add --no-cache curl make g++ unzip openssl perl
# COPY HamClock source from artifact downloaded by CI
COPY ESPHamClock.zip /
# Install Hamclock
# Remove -march=native which causes issues with cross-compilation
RUN unzip ESPHamClock.zip && \
mv ESPHamClock /hamclock && \
chmod 777 /hamclock && \
mkdir /hamclock/.hamclock && \
cd /hamclock && \
sed -i 's/-march=native//g' Makefile && \
make -j 4 hamclock-web-800x480 && \
mv hamclock-web-* /usr/bin/ && \
make clean && \
make -j 4 hamclock-web-1600x960 && \
mv hamclock-web-* /usr/bin/ && \
make clean && \
make -j 4 hamclock-web-2400x1440 && \
mv hamclock-web-* /usr/bin/ && \
make clean && \
make -j 4 hamclock-web-3200x1920 && \
mv hamclock-web-* /usr/bin/ && \
make clean && \
chmod -R a+rwX /hamclock
# Cleanup
WORKDIR /hamclock
RUN apk del --no-cache make unzip
# Install entry point
COPY entrypoint.sh /entrypoint.sh
RUN chmod a+rx /entrypoint.sh
VOLUME /hamclock/.hamclock
HEALTHCHECK --interval=30s --timeout=10s --start-period=2m --retries=3 CMD curl -f http://localhost:8080/get_sys.txt || exit 1
CMD /entrypoint.sh