File tree Expand file tree Collapse file tree 7 files changed +21
-3
lines changed
Expand file tree Collapse file tree 7 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ ARG DISTRIB_ID=BurmillaOS
6060
6161ARG SELINUX_POLICY_URL=https://github.com/burmilla/refpolicy/releases/download/v0.0.3/policy.29
6262
63- ARG KERNEL_VERSION=4.14.218 -burmilla
63+ ARG KERNEL_VERSION=4.14.229 -burmilla
6464ARG KERNEL_URL_amd64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-x86.tar.gz
6565ARG KERNEL_URL_arm64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-arm64.tar.gz
6666
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ func (d *DockerConfig) FullArgs() []string {
2020 if d .TLS {
2121 args = append (args , d .TLSArgs ... )
2222 }
23+
24+ if d .UserNsEnabled {
25+ args = append (args , "--userns-remap" )
26+ args = append (args , "user-docker:user-docker" )
27+ }
2328 return args
2429}
2530
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ var schema = `{
143143 "selinux_enabled": {"type": ["boolean", "null"]},
144144 "storage_driver": {"type": "string"},
145145 "userland_proxy": {"type": ["boolean", "null"]},
146+ "userns_enabled": {"type": ["boolean", "null"]},
146147 "insecure_registry": {"$ref": "#/definitions/list_of_strings"}
147148 }
148149 },
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ type DockerConfig struct {
197197 CAKey string `yaml:"ca_key,omitempty"`
198198 Environment []string `yaml:"environment,omitempty"`
199199 StorageContext string `yaml:"storage_context,omitempty"`
200+ UserNsEnabled bool `yaml:"userns_enabled,omitempty"`
200201 Exec bool `yaml:"exec,omitempty"`
201202}
202203
Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
4040 rm -f /usr/share/bash-completion/completions/* && \
4141 chmod 555 /lib/dhcpcd/dhcpcd-run-hooks && \
4242 sed -i 1,10d /etc/rsyslog.conf && \
43- echo "*.* /var/log/syslog" >> /etc/rsyslog.conf
43+ echo "*.* /var/log/syslog" >> /etc/rsyslog.conf && \
44+ \
45+ addgroup -g 1200 user-docker && \
46+ adduser -u 1200 -G user-docker -S -H user-docker && \
47+ echo 'user-docker:100000:65536' > /etc/subuid && \
48+ echo 'user-docker:100000:65536' > /etc/subgid
4449# dump kernel log to console (but after we've finished booting)
4550# echo "kern.* /dev/console" >> /etc/rsyslog.conf
4651
Original file line number Diff line number Diff line change @@ -26,7 +26,12 @@ RUN apt-get update \
2626 && cat /etc/ssh/sshd_config > /etc/ssh/sshd_config.tpl \
2727 && cat /etc/ssh/sshd_config.append.tpl >> /etc/ssh/sshd_config.tpl \
2828 && rm -f /etc/ssh/sshd_config.append.tpl /etc/ssh/sshd_config \
29- && echo > /etc/motd
29+ && echo > /etc/motd \
30+ \
31+ && addgroup --gid 1200 user-docker \
32+ && adduser --system -u 1200 --gid 1200 --disabled-login --no-create-home user-docker \
33+ && echo 'user-docker:100000:65536' > /etc/subuid \
34+ && echo 'user-docker:100000:65536' > /etc/subgid
3035
3136COPY build/iscsid.conf /etc/iscsi/
3237
Original file line number Diff line number Diff line change 136136 "selinux_enabled" : {"type" : [" boolean" , " null" ]},
137137 "storage_driver" : {"type" : " string" },
138138 "userland_proxy" : {"type" : [" boolean" , " null" ]},
139+ "userns_enabled" : {"type" : [" boolean" , " null" ]},
139140 "insecure_registry" : {"$ref" : " #/definitions/list_of_strings" }
140141 }
141142 },
You can’t perform that action at this time.
0 commit comments