This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 121
Fixes issue 270: footloose container fails to start after upgrading t… #271
Open
MartinAhrer
wants to merge
1
commit into
weaveworks:master
Choose a base branch
from
MartinAhrer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM debian:bullseye | ||
|
||
ENV container docker | ||
|
||
# Don't start any optional services except for the few we need. | ||
RUN find /etc/systemd/system \ | ||
/lib/systemd/system \ | ||
-path '*.wants/*' \ | ||
-not -name '*journald*' \ | ||
-not -name '*systemd-tmpfiles*' \ | ||
-not -name '*systemd-user-sessions*' \ | ||
-exec rm \{} \; | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
dbus systemd openssh-server net-tools iproute2 iputils-ping curl wget vim-tiny sudo && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
EXPOSE 22 | ||
|
||
RUN systemctl set-default multi-user.target | ||
RUN systemctl mask \ | ||
dev-hugepages.mount \ | ||
sys-fs-fuse-connections.mount \ | ||
systemd-update-utmp.service \ | ||
systemd-tmpfiles-setup.service \ | ||
console-getty.service | ||
|
||
# This container image doesn't have locales installed. Disable forwarding the | ||
# user locale env variables or we get warnings such as: | ||
# bash: warning: setlocale: LC_ALL: cannot change locale | ||
RUN sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config | ||
|
||
# https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/ | ||
STOPSIGNAL SIGRTMIN+3 | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be a conditional setup as not all systems using footloose will have cgroups v2 in place. Or at least it needs to be made sure this does not break cgroups v1 based setups of docker. E.g. we (https://github.com/k0sproject/k0s) use footloose heavily without Docker Desktop e.g. in our CI where the runners are cgroups v1 based.