mirror of
https://github.com/rancher/os.git
synced 2025-07-05 19:16:13 +00:00
Refactoring each os image
More reasonable use of COPY, easy to maintain
This commit is contained in:
parent
1b004dff3c
commit
b32e8e37d2
2
images/01-base/.dockerignore
Normal file
2
images/01-base/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -1,6 +1,7 @@
|
||||
FROM rancher/os-rootfs
|
||||
RUN ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
|
||||
# Cleanup Buildroot
|
||||
|
||||
COPY . /
|
||||
|
||||
RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
|
||||
sed -i '/^root/s!/bin/sh!/bin/bash!' /etc/passwd && \
|
||||
echo 'RancherOS \n \l' > /etc/issue && \
|
||||
@ -30,16 +31,9 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
|
||||
adduser rancher docker && \
|
||||
adduser rancher sudo && \
|
||||
adduser docker sudo && \
|
||||
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers
|
||||
COPY inputrc /etc/inputrc
|
||||
COPY growpart /usr/bin/growpart
|
||||
COPY start_ntp.sh /bin/start_ntp.sh
|
||||
COPY dhcpcd/dhcpcd.enter-hook /etc/dhcpcd.enter-hook
|
||||
COPY dhcpcd/10-mtu /lib/dhcpcd/dhcpcd-hooks/
|
||||
COPY dhcpcd/dhcpcd.debug /usr/share/logrotate/logrotate.d/
|
||||
COPY templates/dhcpcd.conf.tpl /etc/dhcpcd.conf.tpl
|
||||
COPY templates/wpa_supplicant.conf.tpl /etc/wpa_supplicant.conf.tpl
|
||||
RUN sed -i s/"partx --update \"\$part\" \"\$dev\""/"partx --update --nr \"\$part\" \"\$dev\""/g /usr/bin/growpart && \
|
||||
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers && \
|
||||
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules && \
|
||||
sed -i s/"partx --update \"\$part\" \"\$dev\""/"partx --update --nr \"\$part\" \"\$dev\""/g /usr/bin/growpart && \
|
||||
sed -i -e 's/duid/clientid/g' /etc/dhcpcd.conf && \
|
||||
rm -f /etc/wpa_supplicant.conf && \
|
||||
ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/ && \
|
||||
|
2
images/02-acpid/.dockerignore
Normal file
2
images/02-acpid/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -1,3 +1,2 @@
|
||||
FROM rancher/os-base
|
||||
COPY lid /etc/acpi/events/
|
||||
COPY suspend.sh /etc/acpi/suspend.sh
|
||||
COPY . /
|
||||
|
2
images/02-bootstrap/.dockerignore
Normal file
2
images/02-bootstrap/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -1,3 +1,2 @@
|
||||
FROM rancher/os-base
|
||||
COPY auto-format.sh /usr/sbin/
|
||||
COPY od-1m0 /
|
||||
COPY . /
|
||||
|
2
images/02-logrotate/.dockerignore
Normal file
2
images/02-logrotate/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -1,5 +1,3 @@
|
||||
FROM rancher/os-base
|
||||
COPY logrotate.d/ /usr/share/logrotate/logrotate.d/
|
||||
COPY logrotate.conf /etc/logrotate.conf
|
||||
COPY entrypoint.sh /usr/bin/entrypoint.sh
|
||||
COPY . /
|
||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||
|
2
images/02-syslog/.dockerignore
Normal file
2
images/02-syslog/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -1,4 +1,3 @@
|
||||
FROM rancher/os-base
|
||||
COPY logrotate.d/ /usr/share/logrotate/logrotate.d/
|
||||
COPY entrypoint.sh /usr/bin/entrypoint.sh
|
||||
COPY . /
|
||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user