Update debian Dockerfiles to avoid updating apt packages only once

This commit is contained in:
Théophile Diot 2023-05-31 18:32:09 -04:00
parent 760ec3b3b6
commit 3ab4a59b6e
No known key found for this signature in database
GPG key ID: E752C80DB72BB014
3 changed files with 7 additions and 11 deletions

View file

@ -20,8 +20,7 @@ RUN mkdir -p /usr/share/bunkerweb/deps && \
rm -rf /tmp/req
# Nginx
RUN apt update && \
apt-get install gnupg2 ca-certificates wget -y && \
RUN apt-get install gnupg2 ca-certificates wget -y && \
echo "deb https://nginx.org/packages/debian/ bullseye nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb-src https://nginx.org/packages/debian/ bullseye nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 && \
@ -29,8 +28,7 @@ RUN apt update && \
apt-get install -y --no-install-recommends nginx=${NGINX_VERSION}-1~bullseye
# Compile and install dependencies
RUN apt update && \
apt install --no-install-recommends bash python3-pip libssl-dev git libpcre++-dev zlib1g-dev libxml2-dev libyajl-dev pkgconf libcurl4-openssl-dev libgeoip-dev liblmdb-dev apt-utils bash build-essential autoconf libtool automake g++ gcc libxml2-dev make musl-dev gnupg patch libreadline-dev libpcre3-dev libgd-dev -y && \
RUN apt install --no-install-recommends bash python3-pip libssl-dev git libpcre++-dev zlib1g-dev libxml2-dev libyajl-dev pkgconf libcurl4-openssl-dev libgeoip-dev liblmdb-dev apt-utils bash build-essential autoconf libtool automake g++ gcc libxml2-dev make musl-dev gnupg patch libreadline-dev libpcre3-dev libgd-dev -y && \
pip install --no-cache-dir --upgrade pip && \
pip install wheel && \
#mkdir -p /usr/share/bunkerweb/deps && \

View file

@ -4,12 +4,12 @@ ENV OS=fedora
ENV NGINX_VERSION 1.24.0
# Install fpm
RUN dnf install -y ruby ruby-devel make gcc redhat-rpm-config rpm-build && \
RUN dnf update -y && \
dnf install -y ruby ruby-devel make gcc redhat-rpm-config rpm-build && \
gem install fpm
# Nginx
RUN dnf update -y && \
dnf install -y curl gnupg2 ca-certificates redhat-lsb-core && \
RUN dnf install -y curl gnupg2 ca-certificates redhat-lsb-core && \
dnf install nginx-${NGINX_VERSION} -y
# Copy dependencies sources folder

View file

@ -20,8 +20,7 @@ RUN mkdir -p /usr/share/bunkerweb/deps && \
rm -rf /tmp/req
# Nginx
RUN apt update && \
apt-get install curl gnupg2 ca-certificates lsb-release ubuntu-keyring software-properties-common -y && \
RUN apt-get install curl gnupg2 ca-certificates lsb-release ubuntu-keyring software-properties-common -y && \
echo "deb https://nginx.org/packages/ubuntu/ jammy nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb-src https://nginx.org/packages/ubuntu/ jammy nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 && \
@ -29,8 +28,7 @@ RUN apt update && \
apt-get install -y --no-install-recommends nginx=${NGINX_VERSION}-1~jammy
# Compile and install dependencies
RUN apt update && \
apt install --no-install-recommends bash python3-pip libssl-dev git libpcre++-dev zlib1g-dev libxml2-dev libyajl-dev pkgconf libcurl4-openssl-dev libgeoip-dev liblmdb-dev apt-utils bash build-essential autoconf libtool automake g++ gcc libxml2-dev make musl-dev gnupg patch libreadline-dev libpcre3-dev libgd-dev -y && \
RUN apt install --no-install-recommends bash python3-pip libssl-dev git libpcre++-dev zlib1g-dev libxml2-dev libyajl-dev pkgconf libcurl4-openssl-dev libgeoip-dev liblmdb-dev apt-utils bash build-essential autoconf libtool automake g++ gcc libxml2-dev make musl-dev gnupg patch libreadline-dev libpcre3-dev libgd-dev -y && \
pip install --no-cache-dir --upgrade pip && \
pip install wheel && \
#mkdir -p /usr/share/bunkerweb/deps && \