Browse Source

reduce number of image layers

Fabian Peter Hammerle 3 years ago
parent
commit
61dbbf8b19
3 changed files with 6 additions and 8 deletions
  1. 3 0
      CHANGELOG.md
  2. 2 7
      Dockerfile
  3. 1 1
      entrypoint.sh

+ 3 - 0
CHANGELOG.md

@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   listener on port `9051`
   (listening on loopback device only)
 
+### Fixed
+- reduced number of image layers
+
 ## [1.0.1] - 2020-02-22
 ### Fixed
 - reduced number of image layers

+ 2 - 7
Dockerfile

@@ -10,19 +10,14 @@ RUN apk add --no-cache \
     && chown onion /onion-service
 VOLUME /onion-service
 
-COPY torrc.template /
-RUN chmod a+r /torrc.template
-
+COPY torrc.template entrypoint.sh /
+RUN chmod -c a+rX /torrc.template /entrypoint.sh
 ENV VERSION 3
 ENV VIRTUAL_PORT 80
 ENV TARGET 1.2.3.4:8080
-
-COPY entrypoint.sh /
-RUN chmod a+rx /entrypoint.sh
 ENTRYPOINT ["/entrypoint.sh"]
 
 USER onion
-
 CMD ["tor", "-f", "/tmp/torrc"]
 
 HEALTHCHECK CMD \

+ 1 - 1
entrypoint.sh

@@ -1,6 +1,6 @@
 #!/bin/sh
 
-set -ex
+set -eux
 
 sed -e "s#{version}#$VERSION#" \
     -e "s#{virtual_port}#$VIRTUAL_PORT#" \