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

add linting using Hadolint #40

Merged
merged 17 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
lint: we are ok with latest tags
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
schurzi committed Oct 17, 2023
commit acf4d76bc7f79075ff8d4badefaac635fbb0b469
2 changes: 2 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -4,3 +4,5 @@ ignored:
- DL3013 # we don't want to pin versions
- DL3018 # we don't want to pin versions
- DL3033 # we don't want to pin versions
- DL3041 # we don't want to pin versions
- DL3037 # we don't want to pin versions

Unchanged files with check annotations Beta

RUN apk add --no-cache ansible
# Install Ansible inventory file
RUN mkdir -p /etc/ansible \

Check failure on line 7 in alpine-ansible-latest/Dockerfile

GitHub Actions / docker

SC2028 info: echo may not expand escape sequences. Use printf.
&& echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# delete file created by systemd that prevents login via ssh
RUN rm -f /{var/run,etc,run}/nologin

Check failure on line 11 in alpine-ansible-latest/Dockerfile

GitHub Actions / docker

SC3009 warning: In POSIX sh, brace expansion is undefined.
CMD [ "ansible-playbook", "--version" ]
yum clean all
# Install Ansible inventory file.
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

Check failure on line 15 in amazon2-ansible-latest/Dockerfile

GitHub Actions / docker

SC3037 warning: In POSIX sh, echo flags are undefined.
# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
&& sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers
# delete file created by systemd that prevents login via ssh
RUN rm -f /{var/run,etc,run}/nologin

Check failure on line 31 in amazon2-ansible-latest/Dockerfile

GitHub Actions / docker

SC3009 warning: In POSIX sh, brace expansion is undefined.
CMD [ "ansible-playbook", "--version" ]
python3-pip && \
yum clean all
RUN pip3 install ansible

Check failure on line 16 in amazon2023-ansible-latest/Dockerfile

GitHub Actions / docker

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
# Disable requiretty.
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

Check failure on line 19 in amazon2023-ansible-latest/Dockerfile

GitHub Actions / docker

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
# Install Ansible inventory file.
RUN mkdir -p /etc/ansible && \

Check failure on line 22 in amazon2023-ansible-latest/Dockerfile

GitHub Actions / docker

SC3037 warning: In POSIX sh, echo flags are undefined.
echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
# https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user
&& sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers
# delete file created by systemd that prevents login via ssh
RUN rm -f /{var/run,etc,run}/nologin

Check failure on line 39 in amazon2023-ansible-latest/Dockerfile

GitHub Actions / docker

SC3009 warning: In POSIX sh, brace expansion is undefined.
VOLUME ["/sys/fs/cgroup"]
CMD [ "ansible-playbook", "--version" ]
LABEL maintainer="Sebastian Gumprich"
# Update, install sudo and systemd, cleanup and remove unneeded unit files.
RUN pacman -S -y \

Check failure on line 5 in arch-ansible-latest/Dockerfile

GitHub Actions / docker

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 5 in arch-ansible-latest/Dockerfile

GitHub Actions / docker

SC2086 info: Double quote to prevent globbing and word splitting.
&& pacman -S --noconfirm \
sudo \
systemd \