Skip to content

Commit

Permalink
wget vs curl
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Dec 3, 2023
1 parent 8497f01 commit 85004af
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions unzoner/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ RUN if [ "$BUILD_OPENSSL" = '1' ]; then \

# https://stackoverflow.com/a/39006247/1559300
RUN if [ "$BUILD_OPENVPN" = '1' ]; then \
set -x; curl --retry 3 -sFo openvpn-$BUILD_OPENVPN_VERSION.tar.gz https://swupdate.openvpn.org/community/releases/openvpn-$BUILD_OPENVPN_VERSION.tar.gz \
set -x; curl --retry 3 --silent --fail -o openvpn-$BUILD_OPENVPN_VERSION.tar.gz https://swupdate.openvpn.org/community/releases/openvpn-$BUILD_OPENVPN_VERSION.tar.gz \
&& tar -xvf openvpn-$BUILD_OPENVPN_VERSION.tar.gz && cd openvpn-$BUILD_OPENVPN_VERSION \
&& if [ "$BUILD_OPENSSL" = '1' ]; then CFLAGS='-I/usr/local/ssl/include -Wl,-rpath=/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib64 -L/usr/local/ssl/lib -L/usr/local/ssl/lib64' ./configure; else ./configure; fi \
&& make -j $(nproc) && make check && make install \
Expand All @@ -87,11 +87,11 @@ RUN if [ "$BUILD_SNIPROXY" = '1' ]; then \
&& make install; fi

RUN if [ "$BUILD_BIRD" = '1' ]; then \
curl --retry 3 -sFo bird-$BUILD_BIRD_VERSION.tar.gz https://bird.network.cz/download/bird-$BUILD_BIRD_VERSION.tar.gz \
set -x; wget -qO bird-$BUILD_BIRD_VERSION.tar.gz https://bird.network.cz/download/bird-$BUILD_BIRD_VERSION.tar.gz \
&& tar -xvf bird-$BUILD_BIRD_VERSION.tar.gz && cd bird-$BUILD_BIRD_VERSION \
&& mkdir -p tools/ \
&& curl --retry 3 -sFo tools/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' \
&& curl --retry 3 -sFo tools/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' \
&& wget -qO tools/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' \
&& wget -qO tools/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' \
&& autoreconf && ./configure && make -j $(nproc) && make install; fi

WORKDIR /root
Expand Down Expand Up @@ -157,12 +157,9 @@ WORKDIR /opt
RUN set -a \
&& . /run/secrets/env \
&& mkdir -p /usr/share/GeoIP/ \
&& wget --retry-on-host-error --retry-connrefused --waitretry=2 -q \
"https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoIP.dat \
&& wget --retry-on-host-error --retry-connrefused --waitretry=2 -q \
"https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoLiteCity.dat \
&& wget --retry-on-host-error --retry-connrefused --waitretry=2 -q \
"https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoIPASNum.dat
&& wget -q "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoIP.dat \
&& wget -q "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoLiteCity.dat \
&& wget -q "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" -O - | gunzip -d - > /usr/share/GeoIP/GeoIPASNum.dat

COPY systemd/* ./systemd/

Expand Down

0 comments on commit 85004af

Please sign in to comment.