Skip to content

Commit

Permalink
Replace tini with Docker's own --init option
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-to-the-dee committed Jan 2, 2019
1 parent 70caa4a commit ce5355e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ apt-get -y install --no-install-recommends windscribe-cli
RUN rm /etc/tinyproxy/*
COPY ./conf/tinyproxy/tinyproxy.conf /etc/tinyproxy
# Add Tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ./docker-entrypoint.sh /
EXPOSE 8888
ENTRYPOINT ["/tini", "--", "/docker-entrypoint.sh"]
ENTRYPOINT ["/docker-entrypoint.sh"]
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
restart: always
cap_add:
- NET_ADMIN
init: true
environment:
- WINDSCRIBE_USERNAME=${WINDSCRIBE_USERNAME}
- WINDSCRIBE_PASSWORD=${WINDSCRIBE_PASSWORD}
Expand All @@ -18,6 +19,11 @@ services:
- "${HOST_PORT:-8888}:8888"
tmpfs:
- /etc/windscribe:exec,mode=700
# volumes: #docker-compose still doesn't support this properly yet :(
# ^^ So carry on using tmpfs: for now ^^
# - type: tmpfs
# target: /etc/windscribe
# mode: exec
networks:
proxy-network:
aliases:
Expand Down
1 change: 1 addition & 0 deletions localproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DNS1="1.1.1.1"
DNS2="1.0.0.1"

docker run --rm -d \
--init \
--cap-add=NET_ADMIN \
--env WINDSCRIBE_USERNAME \
--env WINDSCRIBE_PASSWORD \
Expand Down

0 comments on commit ce5355e

Please sign in to comment.