mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-07 18:01:50 +00:00
Clean up dhcpcd container
It is not necessary to bring up `eth0`, the program does it fine. This means we can remove shell script, clean up build. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
5
pkg/dhcpcd/.gitignore
vendored
5
pkg/dhcpcd/.gitignore
vendored
@@ -1,5 +0,0 @@
|
||||
bin
|
||||
dev
|
||||
proc
|
||||
sys
|
||||
usr
|
@@ -7,8 +7,6 @@ RUN \
|
||||
openrc \
|
||||
&& true
|
||||
|
||||
ADD dhcpcd.conf /dhcpcd.conf
|
||||
ADD start_dhcpcd.sh /usr/local/bin/start_dhcpcd.sh
|
||||
ADD 10-mtu /usr/lib/dhcpcd/dhcpcd-hooks/10-mtu
|
||||
COPY . .
|
||||
|
||||
CMD ["/usr/local/bin/start_dhcpcd.sh"]
|
||||
CMD ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf"]
|
||||
|
@@ -5,7 +5,7 @@ IMAGE=dhcpcd
|
||||
|
||||
BASE=alpine:3.5
|
||||
|
||||
DEPS=dhcpcd.conf 10-mtu start_dhcpcd.sh
|
||||
DEPS=dhcpcd.conf usr/lib/dhcpcd/dhcpcd-hooks/10-mtu
|
||||
|
||||
container: Dockerfile $(DEPS)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
@@ -13,7 +13,7 @@ container: Dockerfile $(DEPS)
|
||||
hash: Dockerfile $(DEPS)
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
docker run --rm $(IMAGE):build sh -c '(cat /usr/local/bin/start_dhcpcd.sh /dhcpcd.conf /usr/lib/dhcpcd/dhcpcd-hooks/10-mtu /lib/apk/db/installed) | sha1sum' | sed 's/ .*//' > hash
|
||||
docker run --rm $(IMAGE):build sh -c 'cat $^ /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||
|
||||
push: hash container
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
@@ -29,6 +29,6 @@ tag: hash container
|
||||
rm -f hash
|
||||
|
||||
clean:
|
||||
rm -rf hash $(DIRS)
|
||||
rm -rf hash
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
.DELETE_ON_ERROR:
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#!bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
ip link set eth0 up
|
||||
|
||||
cp /dhcpcd.conf /etc/dhcpcd.conf
|
||||
|
||||
exec /sbin/dhcpcd --nobackground
|
Reference in New Issue
Block a user