just use one root dir to simplify things

This commit is contained in:
Tim Dysinger 2015-04-23 16:36:49 -10:00
parent 477b891017
commit 43a3a16d22
3 changed files with 51 additions and 55 deletions

5
.gitignore vendored
View file

@ -1,4 +1 @@
/bin/
/lib/
/lib64/
/usr/
/root/

View file

@ -1,8 +1,5 @@
#-*- mode:conf; -*-
FROM scratch
FROM empty
ADD bin /bin
ADD lib /lib
ADD lib64 /lib64
ADD usr /usr
ADD root/ /

View file

@ -1,56 +1,58 @@
default: image
bin:
@mkdir bin
bin/sh: | bin
@cp -L /bin/sh bin/
lib:
@mkdir lib
lib/x86_64-linux-gnu: | lib
@mkdir lib/x86_64-linux-gnu
lib/x86_64-linux-gnu/libm.so.6: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libm.so.6 lib/x86_64-linux-gnu/
lib/x86_64-linux-gnu/libz.so.1: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libz.so.1 lib/x86_64-linux-gnu/
lib/x86_64-linux-gnu/libdl.so.2: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libdl.so.2 lib/x86_64-linux-gnu/
lib/x86_64-linux-gnu/libc.so.6: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/
lib/x86_64-linux-gnu/libpthread.so.0: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libpthread.so.0 lib/x86_64-linux-gnu/
lib/x86_64-linux-gnu/librt.so.1: | lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/librt.so.1 lib/x86_64-linux-gnu/
lib64:
@mkdir lib64
lib64/ld-linux-x86-64.so.2: | lib64
@cp -L /lib64/ld-linux-x86-64.so.2 lib64/
usr/lib:
@mkdir -p usr/lib
usr/lib/x86_64-linux-gnu: | usr/lib
@mkdir usr/lib/x86_64-linux-gnu
usr/lib/x86_64-linux-gnu/gconv: | usr/lib/x86_64-linux-gnu
@mkdir usr/lib/x86_64-linux-gnu/gconv
usr/lib/x86_64-linux-gnu/gconv/UTF-16.so: | usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-16.so usr/lib/x86_64-linux-gnu/gconv/
usr/lib/x86_64-linux-gnu/gconv/UTF-32.so: | usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-32.so usr/lib/x86_64-linux-gnu/gconv/
usr/lib/x86_64-linux-gnu/gconv/UTF-7.so: | usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-7.so usr/lib/x86_64-linux-gnu/gconv/
usr/lib/x86_64-linux-gnu/gconv/gconv-modules: | usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/gconv-modules usr/lib/x86_64-linux-gnu/gconv/
usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache: | usr/lib/x86_64-linux-gnu/gconv/
@cp -L /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache usr/lib/x86_64-linux-gnu/gconv/
usr/lib/x86_64-linux-gnu/libffi.so.6: | lib/x86_64-linux-gnu
@cp -L /usr/lib/x86_64-linux-gnu/libffi.so.6 usr/lib/x86_64-linux-gnu/
usr/lib/x86_64-linux-gnu/libgmp.so.10: | usr/lib/x86_64-linux-gnu
@cp -L /usr/lib/x86_64-linux-gnu/libgmp.so.10 usr/lib/x86_64-linux-gnu/
root:
@mkdir root
root/bin: | root
@mkdir root/bin
root/bin/sh: | root/bin
@cp -L /bin/sh root/bin/
root/lib: | root
@mkdir root/lib
root/lib/x86_64-linux-gnu: | root/lib
@mkdir root/lib/x86_64-linux-gnu
root/lib/x86_64-linux-gnu/libm.so.6: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libm.so.6 root/lib/x86_64-linux-gnu/
root/lib/x86_64-linux-gnu/libz.so.1: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libz.so.1 root/lib/x86_64-linux-gnu/
root/lib/x86_64-linux-gnu/libdl.so.2: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libdl.so.2 root/lib/x86_64-linux-gnu/
root/lib/x86_64-linux-gnu/libc.so.6: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libc.so.6 root/lib/x86_64-linux-gnu/
root/lib/x86_64-linux-gnu/libpthread.so.0: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/libpthread.so.0 root/lib/x86_64-linux-gnu/
root/lib/x86_64-linux-gnu/librt.so.1: | root/lib/x86_64-linux-gnu
@cp -L /lib/x86_64-linux-gnu/librt.so.1 root/lib/x86_64-linux-gnu/
root/lib64:
@mkdir root/lib64
root/lib64/ld-linux-x86-64.so.2: | root/lib64
@cp -L /lib64/ld-linux-x86-64.so.2 root/lib64/
root/usr/lib:
@mkdir -p root/usr/lib
root/usr/lib/x86_64-linux-gnu: | root/usr/lib
@mkdir root/usr/lib/x86_64-linux-gnu
root/usr/lib/x86_64-linux-gnu/gconv: | root/usr/lib/x86_64-linux-gnu
@mkdir root/usr/lib/x86_64-linux-gnu/gconv
root/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so: | root/usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-16.so root/usr/lib/x86_64-linux-gnu/gconv/
root/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so: | root/usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-32.so root/usr/lib/x86_64-linux-gnu/gconv/
root/usr/lib/x86_64-linux-gnu/gconv/UTF-7.so: | root/usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/UTF-7.so root/usr/lib/x86_64-linux-gnu/gconv/
root/usr/lib/x86_64-linux-gnu/gconv/gconv-modules: | root/usr/lib/x86_64-linux-gnu/gconv
@cp -L /usr/lib/x86_64-linux-gnu/gconv/gconv-modules root/usr/lib/x86_64-linux-gnu/gconv/
root/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache: | root/usr/lib/x86_64-linux-gnu/gconv/
@cp -L /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache root/usr/lib/x86_64-linux-gnu/gconv/
root/usr/lib/x86_64-linux-gnu/libffi.so.6: | root/lib/x86_64-linux-gnu
@cp -L /usr/lib/x86_64-linux-gnu/libffi.so.6 root/usr/lib/x86_64-linux-gnu/
root/usr/lib/x86_64-linux-gnu/libgmp.so.10: | root/usr/lib/x86_64-linux-gnu
@cp -L /usr/lib/x86_64-linux-gnu/libgmp.so.10 root/usr/lib/x86_64-linux-gnu/
image: | bin/sh lib/x86_64-linux-gnu/libm.so.6 lib/x86_64-linux-gnu/libz.so.1 lib/x86_64-linux-gnu/libdl.so.2 lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/libpthread.so.0 lib/x86_64-linux-gnu/librt.so.1 lib64/ld-linux-x86-64.so.2 usr/lib/x86_64-linux-gnu/gconv/UTF-16.so usr/lib/x86_64-linux-gnu/gconv/UTF-32.so usr/lib/x86_64-linux-gnu/gconv/UTF-7.so usr/lib/x86_64-linux-gnu/gconv/gconv-modules usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache usr/lib/x86_64-linux-gnu/libffi.so.6 usr/lib/x86_64-linux-gnu/libgmp.so.10
image: | root/bin/sh root/lib/x86_64-linux-gnu/libm.so.6 root/lib/x86_64-linux-gnu/libz.so.1 root/lib/x86_64-linux-gnu/libdl.so.2 root/lib/x86_64-linux-gnu/libc.so.6 root/lib/x86_64-linux-gnu/libc.so.6 root/lib/x86_64-linux-gnu/libpthread.so.0 root/lib/x86_64-linux-gnu/librt.so.1 root/lib64/ld-linux-x86-64.so.2 root/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so root/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so root/usr/lib/x86_64-linux-gnu/gconv/UTF-7.so root/usr/lib/x86_64-linux-gnu/gconv/gconv-modules root/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache root/usr/lib/x86_64-linux-gnu/libffi.so.6 root/usr/lib/x86_64-linux-gnu/libgmp.so.10
@(docker images|grep -e '^empty' >/dev/null 2>&1) || \
(tar cv --files-from >/dev/null 2>&1|docker import - empty)
@docker build -t haskell-scratch .
clean:
@rm -rf bin usr lib lib64
@rm -rf root
.PHONY: default image clean