Zack Williams | 0171fb3 | 2021-09-08 22:31:54 -0700 | [diff] [blame^] | 1 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | FROM debian:11 |
| 5 | |
| 6 | ENV container docker |
| 7 | ENV LC_ALL C |
| 8 | ENV DEBIAN_FRONTEND noninteractive |
| 9 | |
| 10 | # hadolint ignore=DL3008 |
| 11 | RUN apt-get update \ |
| 12 | && apt-get install -y --no-install-recommends \ |
| 13 | bash \ |
| 14 | iproute2 \ |
| 15 | python3 \ |
| 16 | sudo \ |
| 17 | systemd \ |
| 18 | && apt-get clean \ |
| 19 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ |
| 20 | && rm -f /lib/systemd/system/multi-user.target.wants/* \ |
| 21 | /etc/systemd/system/*.wants/* \ |
| 22 | /lib/systemd/system/local-fs.target.wants/* \ |
| 23 | /lib/systemd/system/sockets.target.wants/*udev* \ |
| 24 | /lib/systemd/system/sockets.target.wants/*initctl* \ |
| 25 | /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* \ |
| 26 | /lib/systemd/system/systemd-update-utmp* \ |
| 27 | && ln -s /lib/systemd/system /sbin/init \ |
| 28 | && systemctl set-default multi-user.target |
| 29 | |
| 30 | ENV init /lib/systemd/systemd |
| 31 | VOLUME [ "/sys/fs/cgroup" ] |
| 32 | |
| 33 | ENTRYPOINT ["/lib/systemd/systemd"] |