-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
35 lines (28 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM opensuse/leap:latest
LABEL maintainer="daos-do"
ENV container=docker
RUN zypper install -y dbus-1 systemd-sysvinit; \
zypper clean --all; \
cd /usr/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*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*
RUN LANG=C; \
zypper clean --all; \
zypper refresh --force; \
zypper install -y python3 python3-pip python python-xml sudo curl wget gzip tar less; \
if [ -f /usr/bin/python3 ];then /usr/bin/python3 -m pip install --no-input --disable-pip-version-check pip --upgrade; fi; \
mkdir -p /etc/ansible; \
echo "DO_ANSIBLE_BOOTSTRAPPED=$(date '+%Y-%m-%d %H:%M:%S %Z')" > /etc/ansible/bootstrapped;
RUN mkdir -p /localhome; \
groupadd --gid 5000 ansible; \
useradd -b /localhome -m --gid 5000 --uid 5000 -s /bin/bash -c ansible ansible; \
echo "ansible ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible; \
chmod 600 /etc/sudoers.d/ansible
VOLUME ["/sys/fs/cgroup"]
CMD ["/sbin/init"]