Skip to content

Instantly share code, notes, and snippets.

View TomaszKlosinski's full-sized avatar
💭
#StandWithUkraine 🇺🇦

Tomasz Klosinski TomaszKlosinski

💭
#StandWithUkraine 🇺🇦
View GitHub Profile
@TomaszKlosinski
TomaszKlosinski / playbook.yml
Created May 16, 2017 09:40
Ansible playbook with pre-tasks to limit docker container to run only systemd and journald
---
- hosts: all
pre_tasks:
- name: upgrade all packages
yum:
name: '*'
state: latest
- name: install systemd
yum:
@TomaszKlosinski
TomaszKlosinski / Dockerfile
Created May 16, 2017 09:37
Dockerfile for a systemd based docker image.
FROM fedora:rawhide
MAINTAINER “Dan Walsh” <dwalsh@redhat.com>
ENV container docker
RUN yum -y update; yum clean all
RUN yum -y install systemd; yum clean all;
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);
rm -f /lib/systemd/system/multi-user.target.wants/*;
rm -f /etc/systemd/system/*.wants/*;
rm -f /lib/systemd/system/local-fs.target.wants/*;
rm -f /lib/systemd/system/sockets.target.wants/*udev*;