dockerfile fix

This commit is contained in:
vanhauser-thc 2022-10-13 17:28:39 +02:00
parent 882a1a3aac
commit 8ddec0107b

View file

@ -35,18 +35,23 @@ RUN set -x \
gcc \ gcc \
1>/dev/null \ 1>/dev/null \
# The next line fixes the curl "SSL certificate problem: unable to get local issuer certificate" for linux/arm # The next line fixes the curl "SSL certificate problem: unable to get local issuer certificate" for linux/arm
&& c_rehash \ && c_rehash
# Get hydra sources and compile
&& cd /src \ # Get hydra sources and compile
&& ./configure 1>/dev/null \ RUN cd /src \
&& make 1>/dev/null \ && make clean \
&& make install \ && ./configure \
# Make clean && make \
&& apt-get purge -y make gcc libgpg-error-dev libgcrypt-dev \ && make install
# Make clean
RUN apt-get purge -y make gcc \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
# Verify hydra installation && rm -rf /src
&& hydra -h || error_code=$? \
# Verify hydra installation
RUN hydra -h || error_code=$? \
&& if [ ! "${error_code}" -eq 255 ]; then echo "Wrong exit code for 'hydra help' command"; exit 1; fi \ && if [ ! "${error_code}" -eq 255 ]; then echo "Wrong exit code for 'hydra help' command"; exit 1; fi \
# Unprivileged user creation # Unprivileged user creation
&& echo 'hydra:x:10001:10001::/tmp:/sbin/nologin' > /etc/passwd \ && echo 'hydra:x:10001:10001::/tmp:/sbin/nologin' > /etc/passwd \