Browse Source

upgrade alpine base image v3.11 -> v3.12; reduce number of image layers; use build args to pin package versions

Fabian Peter Hammerle 3 years ago
parent
commit
cdb9908269
3 changed files with 15 additions and 12 deletions
  1. 2 4
      CHANGELOG.md
  2. 13 8
      Dockerfile
  3. 0 0
      entrypoint.sh

+ 2 - 4
CHANGELOG.md

@@ -5,11 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
-### Added
-- Changelog
-- apk add: pinned versions of tor & obfs4proxy
-
 ### Fixed
+- pin versions of tor & obfs4proxy
+- reduce number of image layers
 - ansible-playbook: fixed invalid keyword
 
 ## [0.1.0] - 2019-08-30

+ 13 - 8
Dockerfile

@@ -1,19 +1,24 @@
 # https://pkgs.alpinelinux.org/packages?name=obfs4proxy&arch=x86_64
-FROM alpine:3.11
+FROM alpine:3.12
 
+ARG TOR_PACKAGE_VERSION=0.4.3.5-r0
+ARG OBFS4PROXY_PACKAGE_VERSION=0.0.11-r2
 RUN adduser -S onion \
-    && apk add --no-cache tor=0.4.1.9-r1 \
-    && apk add --no-cache obfs4proxy=0.0.11-r1 \
+    && apk add --no-cache tor=$TOR_PACKAGE_VERSION \
+    && apk add --no-cache obfs4proxy=$OBFS4PROXY_PACKAGE_VERSION \
         --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
 
+#RUN apk add --no-cache \
+#        less \
+#        man-db \
+#        tor-doc=$TOR_PACKAGE_VERSION
+#ENV PAGER=less
+
 ENV OR_PORT=
 ENV PT_PORT=
 ENV CONTACT_INFO=
-COPY torrc.template /
-RUN chmod a+r /torrc.template
-
-COPY entrypoint.sh /
-RUN chmod a+rx /entrypoint.sh
+COPY torrc.template entrypoint.sh /
+RUN chmod -c a+rX /torrc.template /entrypoint.sh
 ENTRYPOINT ["/entrypoint.sh"]
 
 USER onion

+ 0 - 0
entrypoint.sh