Docker: Unterschied zwischen den Versionen

Aus Thoms Wiki
Zur Navigation springenZur Suche springen
apt-get delivers error "Hash sum mismatch"
 
Zeile 22: Zeile 22:
     echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99custom && \
     echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99custom && \
     echo "Acquire::BrokenProxy    true;" >> /etc/apt/apt.conf.d/99custom
     echo "Acquire::BrokenProxy    true;" >> /etc/apt/apt.conf.d/99custom
see [https://forums.docker.com/t/hash-sum-mismatch-writing-more-data-as-expected/45940/2 forums.docker.com]


== htpasswd ==
== htpasswd ==

Aktuelle Version vom 2. Januar 2025, 20:33 Uhr

Lose Notizen und Links

apt-get delivers error "Hash sum mismatch"

Create a file called `badproxy` with these lines:

Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy    true;

And then add a line to your Dockerfile to copy it into the apt config folder:

COPY ./badproxy /etc/apt/apt.conf.d/99fixbadproxy

Alternative - one single command in Dockerfile:

# Configure apt to avoid Hash Sum mismatch
RUN echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99custom && \
    echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99custom && \
    echo "Acquire::BrokenProxy    true;" >> /etc/apt/apt.conf.d/99custom

see forums.docker.com

htpasswd

docker run --rm httpd htpasswd -nb info geheim
docker run --rm httpd htpasswd -nbBC 10 info geheim

für die Parameter von htpasswd siehe https://httpd.apache.org/docs/2.4/programs/htpasswd.html