Selaa lähdekoodia

Move enviroment variables to Dockerfile

Joshua 8 vuotta sitten
vanhempi
commit
f6bdcfc754
2 muutettua tiedostoa jossa 7 lisäystä ja 8 poistoa
  1. 7 0
      Dockerfile
  2. 0 8
      cloudflare.sh

+ 7 - 0
Dockerfile

@@ -3,6 +3,13 @@ FROM alpine:3.6
 ADD cloudflare.sh /cloudflare.sh
 ADD cron /var/spool/cron/crontabs/root
 
+ENV ZONE=example.com \
+    HOST=example.com \
+    EMAIL=example@example.com \
+    API=1111111111111111 \
+    TTL=1 \
+    PROXY=true
+
 RUN apk add --update curl && \
     rm -rf /var/cache/apk/* && \
     chmod +x /cloudflare.sh

+ 0 - 8
cloudflare.sh

@@ -1,13 +1,5 @@
 #!/bin/sh
 
-#Environment Variables
-ZONE=${ZONE:-example.com}
-HOST=${HOST:-example.com}
-EMAIL=${EMAIL:-example@example.com}
-API=${API:-1111111111111111}
-TTL=${TTL:1}
-PROXY=${PROXY:true}
-
 echo "Current time: $(date "+%Y-%m-%d %H:%M:%S")"
 ip_file="ip"