Skip to content

Commit

Permalink
Remove unnecessary getty and udev targets that can result in high CPU…
Browse files Browse the repository at this point in the history
… usage when using multiple containers with Molecule (ansible/molecule#1104)
  • Loading branch information
percygrunwald committed Feb 7, 2019
1 parent 5c3f7e7 commit 0db369d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@ RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir -p /etc/ansible
RUN echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts

# Remove unnecessary getty and udev targets that can result in high CPU usage when using
# multiple containers with Molecule (https://github.com/ansible/molecule/issues/1104)
RUN rm -f /lib/systemd/system/systemd*udev* \
&& rm -f /lib/systemd/system/getty.target

VOLUME ["/sys/fs/cgroup"]
CMD ["/usr/lib/systemd/systemd"]

0 comments on commit 0db369d

Please sign in to comment.