dev-sec/docker-ansible

Fedora with systemd

danielkubat opened this issue · 5 comments

It seems, that the latest fedora image does not contain systemd, therefore automated tests are failing, because /sbin/init is missing:

https://travis-ci.org/github/dev-sec/ansible-os-hardening/jobs/717298859#L535
https://travis-ci.org/github/dev-sec/ansible-ssh-hardening/jobs/717077625#L525

I would suggest to change source image here:
https://github.com/rndmh3ro/docker-ansible/blob/fe9468fff1838fc4e30c49b3be051e313859fd3c/fedora-ansible-latest/Dockerfile#L1

to the same one with systemd: https://hub.docker.com/r/fedora/systemd-systemd

so as a result:

FROM fedora/systemd-systemd:latest
LABEL maintainer="Sebastian Gumprich"

RUN dnf -y update \
    && dnf -y install ansible python python3-libselinux \
    && dnf clean all

RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

CMD [ "ansible-playbook", "--version" ]

Can you please rebuild the image manually in Docker hub? It seems, that it is still old-one in place as latest.

https://hub.docker.com/r/rndmh3ro/docker-fedora-ansible/builds

The build fails.. https://gist.github.com/rndmh3ro/f196ec1973019a335d540d5885562b61

huh..I will rework the Dockerfile and raise another PR.

The fedora you referenced hasn't been updates since 4 years: https://hub.docker.com/r/fedora/systemd-systemd

I fixed it by installing systemd in the container. 9dc947b