-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
51 lines (44 loc) · 1.48 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
## PLEASE DON'T CHANGE ANYTHING IN THIS FILE UNLESS YOU'RE developing.
## REFER TO THE DOCUMENTATION FOR CONFIGURATION OF YOUR HAMCLOCK!
FROM alpine
# Configuration. Will be overwritten using the config.yaml file or docker run configuration.
ENV CALLSIGN="AB1CDE"
ENV LOCATOR="JJ00aa"
ENV LAT="00"
ENV LONG="00"
ENV UTC_OFFSET="2"
ENV VOACAP_MODE="38"
ENV VOACAP_POWER="100"
ENV CALLSIGN_BACKGROUND_COLOR="100,100,100"
ENV CALLSIGN_BACKGROUND_RAINBOW="0"
ENV CALLSIGN_COLOR="0,0,0"
ENV FLRIG_PORT="12345"
ENV FLRIG_HOST="localhost"
ENV USE_FLRIG="0"
ENV USE_METRIC="1"
USER root
WORKDIR /root/hamclock
# Install prerequisites
RUN apk add curl make g++ libx11-dev openssl unzip perl
# Install Hamclock
RUN rm -fr ESPHamClock && \
curl -O https://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip && \
unzip ESPHamClock.zip && \
cd ESPHamClock && \
make -j 4 hamclock-web-2400x1440 && \
make install
# Install Hamclock Contrib and move hceeprom to hamclock directory
RUN cd /root/hamclock && \
curl -O https://www.clearskyinstitute.com/ham/HamClock/hamclock-contrib.zip && \
unzip hamclock-contrib.zip
RUN mv hamclock-contrib/hceeprom.pl /root/hamclock/ESPHamClock
WORKDIR /root/hamclock/ESPHamClock
RUN chmod +x hceeprom.pl
# Run Hamclock for 15 seconds in order to create config file
RUN /usr/local/bin/hamclock -t 20 & sleep 15; kill -INT %+
# Copy runfile
WORKDIR /root/hamclock
COPY run.sh .
RUN chmod +x run.sh
WORKDIR /root/hamclock/ESPHamClock
CMD /root/hamclock/run.sh