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 5 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
12 changes: 6 additions & 6 deletions images/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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 \
conntrack \
coreutils \
curl \
Expand Down Expand Up @@ -38,14 +37,15 @@ RUN apt install -y \
sudo \
systemd \
systemd-sysv \
&& apt-get clean
systemd-timesyncd \
xz-utils \
&& apt-get clean \
&& 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
RUN systemctl enable systemd-networkd
RUN systemctl enable ssh
RUN echo "auto lo" > /etc/network/interfaces
RUN echo "iface lo inet loopback" >> /etc/network/interfaces

# workaround https://github.com/systemd/systemd/issues/12231
# see also: https://github.com/OSInside/kiwi/issues/1015
Expand Down
19 changes: 11 additions & 8 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ 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 \
conntrack \
console-data \
coreutils \
Expand Down Expand Up @@ -38,14 +40,15 @@ RUN apt install -y \
squashfs-tools \
sudo \
systemd \
&& apt-get clean
systemd-timesyncd \
xz-utils \
&& apt-get clean \
&& 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
RUN systemctl enable systemd-networkd
RUN systemctl enable ssh
RUN echo "auto lo" > /etc/network/interfaces
RUN echo "iface lo inet loopback" >> /etc/network/interfaces

# Enable tmp
RUN cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
Expand Down
19 changes: 11 additions & 8 deletions images/Dockerfile.ubuntu-20-lts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ 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 \
conntrack \
console-data \
coreutils \
Expand Down Expand Up @@ -40,14 +42,15 @@ RUN apt install -y \
squashfs-tools \
sudo \
systemd \
&& apt-get clean
systemd-timesyncd \
xz-utils \
&& apt-get clean \
&& 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
RUN systemctl enable systemd-networkd
RUN systemctl enable ssh
RUN echo "auto lo" > /etc/network/interfaces
RUN echo "iface lo inet loopback" >> /etc/network/interfaces

# Enable tmp
RUN cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
Expand Down
19 changes: 11 additions & 8 deletions images/Dockerfile.ubuntu-22-lts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ 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 \
conntrack \
console-data \
coreutils \
Expand Down Expand Up @@ -40,14 +42,15 @@ RUN apt install -y \
squashfs-tools \
sudo \
systemd \
&& apt-get clean
systemd-timesyncd \
xz-utils \
&& apt-get clean \
&& 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
RUN systemctl enable systemd-networkd
RUN systemctl enable ssh
RUN echo "auto lo" > /etc/network/interfaces
RUN echo "iface lo inet loopback" >> /etc/network/interfaces

# Enable tmp
RUN cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
Expand Down