Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐧 Fix Some Lint Issues for Debian-based Images #821

Merged
merged 15 commits into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions images/.hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ ignored:
- DL3003
# Always tag the version of an image explicitly: https://github.com/hadolint/hadolint/wiki/DL3006
- DL3006
# Pin versions in apt get install: https://github.com/hadolint/hadolint/wiki/DL3008
- DL3008
# Pin versions in apk add: https://github.com/hadolint/hadolint/wiki/DL3018
- DL3018
# Do not use apt as it is meant to be an end-user tool, use apt-get or apt-cache instead: https://github.com/hadolint/hadolint/wiki/DL3027
- DL3027
# Specify version with zypper install -y <package>[=]<version>: https://github.com/hadolint/hadolint/wiki/DL3037
- DL3037
# dnf clean all missing after dnf command: https://github.com/hadolint/hadolint/wiki/DL3040
Expand Down
49 changes: 44 additions & 5 deletions images/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,84 @@ FROM $BASE_IMAGE

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt update
RUN apt install -y \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
conntrack \
console-setup \
coreutils \
cryptsetup \
curl \
debianutils \
dmraid \
dosfstools \
dracut \
dracut-live \
dracut-network \
e2fsprogs \
e2fsprogs-l10n \
efibootmgr \
ethtool \
firmware-linux-free \
fuse3 \
gawk \
gnupg \
gnupg1-l10n \
grub-efi-amd64-bin \
grub-efi-amd64-signed \
grub-pc-bin \
grub2 \
grub2-common \
haveged \
iproute2 \
iptables \
isc-dhcp-common \
jq \
krb5-locales \
libatm1 \
libglib2.0-data \
libgpm2 \
libldap-common \
libnss-systemd \
libpam-cap \
libsasl2-modules \
linux-image-amd64 \
lvm2 \
mdadm \
nano \
nbd-client \
ncurses-term \
neovim \
nfs-common \
nftables \
open-iscsi \
open-vm-tools \
openssh-server \
os-prober \
parted \
patch \
pigz \
pkg-config \
polkitd \
psmisc \
publicsuffix \
python3-pynvim \
rsync \
shared-mime-info \
snapd \
squashfs-tools \
sudo \
systemd \
systemd-sysv \
systemd-timesyncd \
tar \
xauth \
xclip \
xdg-user-dirs \
xxd \
xz-utils \
&& apt-get clean
zerofree \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand All @@ -65,4 +104,4 @@ RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo


# Clear cache
RUN apt-get clean && rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
RUN rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
60 changes: 52 additions & 8 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,89 @@ FROM $BASE_IMAGE

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:oibaf/test
RUN apt update
RUN apt install -y \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gnupg \
software-properties-common \
&& add-apt-repository ppa:oibaf/test \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
conntrack \
console-data \
console-setup \
coreutils \
cryptsetup \
curl \
dbus-user-session \
debianutils \
dmsetup \
dosfstools \
dracut \
dracut-live \
dracut-network \
e2fsprogs \
efibootmgr \
ethtool \
firmware-sof-signed \
fuse3 \
gawk \
grub-efi-amd64-bin \
grub-efi-amd64-signed \
grub-pc-bin \
grub2 \
grub2-common \
haveged \
iproute2 \
iptables \
isc-dhcp-common \
jq \
kbd \
krb5-locales \
libatm1 \
libldap-common \
libnss-systemd \
libpam-cap \
libsasl2-modules \
linux-image-generic-hwe-22.04 \
lvm2 \
mdadm \
nano \
nbd-client \
ncurses-term \
neovim \
networkd-dispatcher \
nfs-common \
open-iscsi \
open-vm-tools \
openssh-server \
os-prober \
packagekit-tools \
parted \
pigz \
pkg-config \
polkitd \
publicsuffix \
python3-pynvim \
rsync \
shared-mime-info \
snapd \
squashfs-tools \
ssh-import-id \
sudo \
systemd \
systemd-hwe-hwdb \
systemd-resolved \
systemd-timesyncd \
tar \
&& apt-get clean
thermald \
unattended-upgrades \
xauth \
xclip \
xdg-user-dirs \
xxd \
xz-utils \
zerofree \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand All @@ -58,4 +102,4 @@ RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo


# Clear cache
RUN apt-get clean && rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
RUN rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
56 changes: 48 additions & 8 deletions images/Dockerfile.ubuntu-20-lts
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,86 @@ FROM $BASE_IMAGE

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:oibaf/test
RUN apt update
RUN apt install -y \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gnupg \
software-properties-common \
&& add-apt-repository ppa:oibaf/test \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
conntrack \
console-data \
console-setup \
coreutils \
cryptsetup \
curl \
debianutils \
dmsetup \
dosfstools \
dracut \
dracut-network \
e2fsprogs \
efibootmgr \
ethtool \
file \
fuse \
gawk \
grub-efi-amd64-bin \
grub-efi-amd64-signed \
grub-pc-bin \
grub2 \
grub2-common \
haveged \
iproute2 \
iptables \
isc-dhcp-common \
jq \
kbd \
krb5-locales \
libatm1 \
libfile-fcntllock-perl \
liblocale-gettext-perl \
libnss-systemd \
libpam-cap \
libsasl2-modules \
linux-image-generic-hwe-20.04 \
lldpd \
lvm2 \
mdadm \
nano \
nbd-client \
ncurses-term \
neovim \
networkd-dispatcher \
nfs-common \
open-iscsi \
open-vm-tools \
openssh-server \
os-prober \
packagekit-tools \
parted \
policykit-1 \
publicsuffix \
python3-neovim \
rsync \
shared-mime-info \
snapd \
snmpd \
squashfs-tools \
ssh-import-id \
sudo \
systemd \
systemd-timesyncd \
tar \
&& apt-get clean
thermald \
unattended-upgrades \
xauth \
xclip \
xdg-user-dirs \
xxd \
xz-utils \
zerofree \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand All @@ -59,4 +99,4 @@ RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo


# Clear cache
RUN apt-get clean && rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
RUN rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id && rm /etc/hostname
Loading