Skip to content

Commit

Permalink
fix: safe apt install one-by-one
Browse files Browse the repository at this point in the history
  • Loading branch information
pifou25 committed May 12, 2024
1 parent b64cd0b commit f780b86
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 33 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/buildx-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 'master'
- 'develop'
- 'feature/safe_apt_install'

# no concurrency, cancel previous running workflow
concurrency:
Expand Down Expand Up @@ -42,7 +42,10 @@ jobs:
# This step build the same image on different runners / platforms
runs-on: ubuntu-latest
needs: initStep
# continue to next job even if some matrix steps fails
continue-on-error: true
strategy:
# don't stop if any matrix combination fails
fail-fast: false
matrix:
debian: [buster, bullseye, bookworm]
Expand Down Expand Up @@ -286,4 +289,4 @@ jobs:
# inspect and add a minute sleep to avoid HTTP 429 error (too many requests...)
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
sleep 1m
sleep 30s
66 changes: 35 additions & 31 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,37 +74,41 @@ RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/issue && cat /etc/motd &&
# common packages intall
# alphabetical order for better compare
RUN apt-get update && \

Check failure on line 76 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3009 info: Delete the apt-get lists after installing something

Check failure on line 76 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
apt-get install --no-install-recommends --no-install-suggests -q -y tzdata software-properties-common && \
add-apt-repository non-free && \
apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -q -y \
apt-transport-https \
apt-utils \
at \
bc \
ccze \
curl \
dos2unix \
ffmpeg \
gettext \
git \
iproute2 \
librsync-dev \
libssh2-1 \
libssh2-1-dev \
libzip-dev \
locales \
net-tools \
nmap \
ntp \
ntpdate \
mariadb-client \
python3 python3-dev python3-pip python3-virtualenv \
smbclient \
ssl-cert \
sudo \
wget \
zip unzip
apt-get install --no-install-recommends --no-install-suggests -q -y tzdata && \
apt-get install --no-install-recommends --no-install-suggests -q -y software-properties-common
RUN add-apt-repository non-free && \

Check failure on line 79 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3009 info: Delete the apt-get lists after installing something
apt-get update
RUN apt-get install --no-install-recommends --no-install-suggests -q -y apt-transport-https

Check failure on line 81 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
RUN apt-get install --no-install-recommends --no-install-suggests -q -y apt-utils

Check failure on line 82 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

Check failure on line 82 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
RUN apt-get install --no-install-recommends --no-install-suggests -q -y at

Check failure on line 83 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

Check failure on line 83 in build/Dockerfile

View workflow job for this annotation

GitHub Actions / initStep

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
RUN apt-get install --no-install-recommends --no-install-suggests -q -y bc
RUN apt-get install --no-install-recommends --no-install-suggests -q -y ccze
RUN apt-get install --no-install-recommends --no-install-suggests -q -y curl
RUN apt-get install --no-install-recommends --no-install-suggests -q -y dos2unix
RUN apt-get install --no-install-recommends --no-install-suggests -q -y ffmpeg
RUN apt-get install --no-install-recommends --no-install-suggests -q -y gettext
RUN apt-get install --no-install-recommends --no-install-suggests -q -y git
RUN apt-get install --no-install-recommends --no-install-suggests -q -y iproute2
RUN apt-get install --no-install-recommends --no-install-suggests -q -y librsync-dev
RUN apt-get install --no-install-recommends --no-install-suggests -q -y libssh2-1
RUN apt-get install --no-install-recommends --no-install-suggests -q -y libssh2-1-dev
RUN apt-get install --no-install-recommends --no-install-suggests -q -y libzip-dev
RUN apt-get install --no-install-recommends --no-install-suggests -q -y locales
RUN apt-get install --no-install-recommends --no-install-suggests -q -y net-tools
RUN apt-get install --no-install-recommends --no-install-suggests -q -y nmap
RUN apt-get install --no-install-recommends --no-install-suggests -q -y ntp
RUN apt-get install --no-install-recommends --no-install-suggests -q -y ntpdate
RUN apt-get install --no-install-recommends --no-install-suggests -q -y mariadb-client
RUN apt-get install --no-install-recommends --no-install-suggests -q -y python3
RUN apt-get install --no-install-recommends --no-install-suggests -q -y python3-dev
RUN apt-get install --no-install-recommends --no-install-suggests -q -y python3-pip
RUN apt-get install --no-install-recommends --no-install-suggests -q -y python3-virtualenv
RUN apt-get install --no-install-recommends --no-install-suggests -q -y smbclient
RUN apt-get install --no-install-recommends --no-install-suggests -q -y ssl-cert
RUN apt-get install --no-install-recommends --no-install-suggests -q -y sudo
RUN apt-get install --no-install-recommends --no-install-suggests -q -y wget
RUN apt-get install --no-install-recommends --no-install-suggests -q -y zip
RUN apt-get install --no-install-recommends --no-install-suggests -q -y unzip

# add php extension
# shellcheck disable=DL3022
Expand Down

0 comments on commit f780b86

Please sign in to comment.