mirror of
https://github.com/rancher/os.git
synced 2025-07-04 10:36:14 +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
|
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 && \
|
RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
|
||||||
sed -i '/^root/s!/bin/sh!/bin/bash!' /etc/passwd && \
|
sed -i '/^root/s!/bin/sh!/bin/bash!' /etc/passwd && \
|
||||||
echo 'RancherOS \n \l' > /etc/issue && \
|
echo 'RancherOS \n \l' > /etc/issue && \
|
||||||
@ -30,16 +31,9 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
|
|||||||
adduser rancher docker && \
|
adduser rancher docker && \
|
||||||
adduser rancher sudo && \
|
adduser rancher sudo && \
|
||||||
adduser docker sudo && \
|
adduser docker sudo && \
|
||||||
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers
|
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers && \
|
||||||
COPY inputrc /etc/inputrc
|
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules && \
|
||||||
COPY growpart /usr/bin/growpart
|
sed -i s/"partx --update \"\$part\" \"\$dev\""/"partx --update --nr \"\$part\" \"\$dev\""/g /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 && \
|
|
||||||
sed -i -e 's/duid/clientid/g' /etc/dhcpcd.conf && \
|
sed -i -e 's/duid/clientid/g' /etc/dhcpcd.conf && \
|
||||||
rm -f /etc/wpa_supplicant.conf && \
|
rm -f /etc/wpa_supplicant.conf && \
|
||||||
ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/ && \
|
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
|
FROM rancher/os-base
|
||||||
COPY lid /etc/acpi/events/
|
COPY . /
|
||||||
COPY suspend.sh /etc/acpi/suspend.sh
|
|
||||||
|
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
|
FROM rancher/os-base
|
||||||
COPY auto-format.sh /usr/sbin/
|
COPY . /
|
||||||
COPY od-1m0 /
|
|
||||||
|
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
|
FROM rancher/os-base
|
||||||
COPY logrotate.d/ /usr/share/logrotate/logrotate.d/
|
COPY . /
|
||||||
COPY logrotate.conf /etc/logrotate.conf
|
|
||||||
COPY entrypoint.sh /usr/bin/entrypoint.sh
|
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
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
|
FROM rancher/os-base
|
||||||
COPY logrotate.d/ /usr/share/logrotate/logrotate.d/
|
COPY . /
|
||||||
COPY entrypoint.sh /usr/bin/entrypoint.sh
|
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user