-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cleanup Dockerfile - Remove unused ARGs - Add log lines grouping (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines)
- Loading branch information
Showing
1 changed file
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,12 @@ FROM alpine:3.18.3 | |
# Build-time variables | ||
ARG TOR_VERSION=0.4.8.6 | ||
ARG TZ=Europe/Berlin | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG CURL_OPTIONS="--no-progress-meter --fail --location --remote-name" | ||
|
||
WORKDIR /tmp | ||
|
||
RUN \ | ||
echo "::group::Install required packages" && \ | ||
set -o xtrace && \ | ||
if test -z "$TOR_VERSION" ; then echo ERROR: TOR_VERSION not provided && exit 1; fi && \ | ||
\ | ||
apk update && \ | ||
apk add \ | ||
curl \ | ||
|
@@ -34,7 +30,10 @@ RUN \ | |
xz-dev \ | ||
zlib-dev \ | ||
zstd-dev && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Download Tor" && \ | ||
CURL_OPTIONS="--no-progress-meter --fail --location --remote-name" && \ | ||
curl ${CURL_OPTIONS} "https://dist.torproject.org/tor-${TOR_VERSION}.tar.gz" && \ | ||
curl ${CURL_OPTIONS} "https://dist.torproject.org/tor-${TOR_VERSION}.tar.gz.sha256sum" && \ | ||
curl ${CURL_OPTIONS} "https://dist.torproject.org/tor-${TOR_VERSION}.tar.gz.sha256sum.asc" && \ | ||
|
@@ -43,8 +42,10 @@ RUN \ | |
[email protected] && \ | ||
sha256sum -c "tor-${TOR_VERSION}.tar.gz.sha256sum" && \ | ||
gpg --verify "tor-${TOR_VERSION}.tar.gz.sha256sum.asc" && \ | ||
\ | ||
tar -zxf "tor-${TOR_VERSION}.tar.gz" && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Configure" && \ | ||
cd tor-${TOR_VERSION} && \ | ||
./configure \ | ||
--sysconfdir=/etc \ | ||
|
@@ -57,16 +58,30 @@ RUN \ | |
--enable-lzma \ | ||
--enable-zstd \ | ||
--silent && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Build" && \ | ||
CFLAGS=-Wno-cpp make && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Test" && \ | ||
make test && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Install" && \ | ||
make install && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Cleanup" && \ | ||
apk del build && \ | ||
rm -rf /tmp/* && \ | ||
rm -rf /var/cache/apk/* && \ | ||
echo "::endgroup::" && \ | ||
\ | ||
echo "::group::Add tor user and group" && \ | ||
addgroup -S tor && \ | ||
adduser -s /bin/false -SDH -G tor tor | ||
adduser -s /bin/false -SDH -G tor tor && \ | ||
echo "::endgroup::" | ||
|
||
VOLUME /data | ||
WORKDIR /data | ||
|