Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
- Replace deprecated label MAINTAINER
- Some hadolinting for Multiple consecutive `RUN` instructions
  • Loading branch information
szEvEz committed Oct 17, 2023
1 parent 6aa850b commit db9915d
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 56 deletions.
4 changes: 2 additions & 2 deletions alpine-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:latest
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

RUN apk add --update ansible
RUN apk add --no-cache ansible

# Install Ansible inventory file
RUN mkdir -p /etc/ansible \
Expand Down
2 changes: 1 addition & 1 deletion amazon2-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM amazonlinux:2
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Install Ansible and other requirements.
RUN rpm -ihv http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Expand Down
18 changes: 9 additions & 9 deletions amazon2023-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
FROM amazonlinux:2023
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Install Ansible and other requirements.
RUN yum makecache --timer \
&& yum -y install initscripts \
&& yum -y update \
&& yum -y install \
RUN yum makecache --timer && \
yum -y install initscripts && \
yum -y update && \
yum -y install \
sudo \
which \
hostname \
python3 \
python3-pip \
&& yum clean all
python3-pip && \
yum clean all

RUN pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
2 changes: 1 addition & 1 deletion arch-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM archlinux:latest
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Update, install sudo and systemd, cleanup and remove unneeded unit files.
RUN pacman -S -y \
Expand Down
8 changes: 3 additions & 5 deletions centos7-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM centos:7
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8


# Install systemd -- See https://hub.docker.com/_/centos/
RUN yum -y update; yum clean all; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
Expand Down Expand Up @@ -38,9 +37,8 @@ RUN yum -y install yum-plugin-copr libseccomp && \
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Upgrade pip so cryptography package works.
RUN python3 -m pip install --upgrade pip

RUN pip3 install ansible
RUN python3 -m pip install --upgrade pip && \
pip3 install ansible

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
10 changes: 5 additions & 5 deletions centos8-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM centos:8
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
Expand Down Expand Up @@ -27,15 +27,15 @@ RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos
&& yum clean all

# upgrade pip because of the rust dependency error
RUN python3 -m pip install --upgrade pip
RUN pip3 install ansible
RUN python3 -m pip install --upgrade pip && \
pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
10 changes: 5 additions & 5 deletions centosstream8-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM quay.io/centos/centos:stream8
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
Expand Down Expand Up @@ -27,15 +27,15 @@ RUN yum makecache --timer \
&& yum clean all

# upgrade pip because of the rust dependency error
RUN python3 -m pip install --upgrade pip
RUN pip3 install ansible
RUN python3 -m pip install --upgrade pip && \
pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
10 changes: 5 additions & 5 deletions centosstream9-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM quay.io/centos/centos:stream9
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
Expand All @@ -25,15 +25,15 @@ RUN yum makecache --timer \
&& yum clean all

# upgrade pip because of the rust dependency error
RUN python3 -m pip install --upgrade pip
RUN pip3 install ansible
RUN python3 -m pip install --upgrade pip && \
pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
2 changes: 1 addition & 1 deletion debian10-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM debian:buster
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

RUN apt-get update -y && apt-get install --fix-missing && \
DEBIAN_FRONTEND=noninteractive \
Expand Down
6 changes: 3 additions & 3 deletions opensuse_tumbleweed-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM opensuse/tumbleweed:latest
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

RUN zypper install -y python ansible dbus-1 systemd-sysvinit shadow sudo
Expand All @@ -8,8 +8,8 @@ RUN cp /usr/lib/systemd/system/dbus.service /etc/systemd/system/; \
sed -i 's/OOMScoreAdjust=-900//' /etc/systemd/system/dbus.service

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
6 changes: 3 additions & 3 deletions openwrt-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM openwrt/rootfs:latest
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

RUN mkdir -p /var/lock && \
opkg update && \
if [[ $(opkg list-upgradable) ]]; then opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade; fi && \
opkg install python3 python3-pip python3-cryptography \
sudo bash sed shadow-su shadow-groupadd shadow-useradd shadow-usermod

RUN pip3 install --upgrade pip
RUN pip3 install ansible
RUN pip3 install --upgrade pip && \
pip3 install ansible

# Install Ansible inventory file
RUN mkdir -p /etc/ansible \
Expand Down
2 changes: 1 addition & 1 deletion oracle7-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM oraclelinux:7-slim
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Add Oracle EPEL repo that contains Ansible
RUN yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64/
Expand Down
11 changes: 5 additions & 6 deletions rocky8-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM rockylinux/rockylinux:8
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
Expand All @@ -26,16 +26,15 @@ RUN yum makecache --timer \
&& yum clean all

# upgrade pip because of the rust dependency error
RUN pip3 install --upgrade pip

RUN pip3 install ansible
RUN pip3 install --upgrade pip && \
pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
11 changes: 5 additions & 6 deletions rocky9-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM docker.io/rockylinux/rockylinux:9
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
Expand All @@ -18,16 +18,15 @@ RUN yum makecache --timer \
&& yum clean all

# upgrade pip because of the rust dependency error
RUN pip3 install --upgrade pip

RUN pip3 install ansible
RUN pip3 install --upgrade pip && \
pip3 install ansible

# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
RUN mkdir -p /etc/ansible && \
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
Expand Down
2 changes: 1 addition & 1 deletion ubuntu1804-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:18.04
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Install dependencies.
RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion ubuntu2004-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:20.04
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Install dependencies.
RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion ubuntu2204-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:22.04
MAINTAINER Sebastian Gumprich
LABEL maintainer="Sebastian Gumprich"

# Install dependencies.
RUN apt-get update \
Expand Down

0 comments on commit db9915d

Please sign in to comment.