diff --git a/alpine/base/alpine-build-c/Dockerfile b/alpine/base/alpine-build-c/Dockerfile index f66914281..c161ff805 100644 --- a/alpine/base/alpine-build-c/Dockerfile +++ b/alpine/base/alpine-build-c/Dockerfile @@ -7,16 +7,24 @@ RUN \ automake \ bash \ bc \ + binutils-dev \ + bison \ cmake \ curl \ + flex \ gmp-dev \ + gtk+2.0-dev \ + gtk+-dev \ groff \ installkernel \ kmod \ + libelf-dev \ linux-headers \ ncurses-dev \ - perl \ + perl-dev \ + python-dev \ sed \ + slang-dev \ squashfs-tools \ syslinux \ unzip \ diff --git a/alpine/base/perf/.gitignore b/alpine/base/perf/.gitignore new file mode 100644 index 000000000..7447f89a5 --- /dev/null +++ b/alpine/base/perf/.gitignore @@ -0,0 +1 @@ +/bin \ No newline at end of file diff --git a/alpine/base/perf/Dockerfile b/alpine/base/perf/Dockerfile new file mode 100644 index 000000000..f38429595 --- /dev/null +++ b/alpine/base/perf/Dockerfile @@ -0,0 +1,17 @@ +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 + +ARG KERNEL_VERSION=4.8.14 + +# get kernel source and extract it under /linux +ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz +RUN curl -fsSL -o linux-${KERNEL_VERSION}.tar.xz ${KERNEL_SOURCE} +RUN cat linux-${KERNEL_VERSION}.tar.xz | tar --absolute-names -xJ && mv /linux-${KERNEL_VERSION} /linux + +RUN mkdir -p /build/perf && \ + make -C /linux/tools/perf O=/build/perf LDFLAGS=-static + +WORKDIR /build/perf +CMD ["tar", "cf", "-", "perf"] + + diff --git a/alpine/base/perf/Makefile b/alpine/base/perf/Makefile new file mode 100644 index 000000000..08a990463 --- /dev/null +++ b/alpine/base/perf/Makefile @@ -0,0 +1,9 @@ +DEPS=Dockerfile + +bin/perf: $(DEPS) + mkdir -p bin + BUILD=$$( docker build -q . ) && \ + docker run --rm --net=none $$BUILD | tar xf - -C bin + +clean: + rm -rf bin diff --git a/alpine/base/perf/README.md b/alpine/base/perf/README.md new file mode 100644 index 000000000..d1fa03a92 --- /dev/null +++ b/alpine/base/perf/README.md @@ -0,0 +1 @@ +Builds a statically linked version of the Linux kernel `perf` utility. You may want to/need to adjust the kernel version in the `Dockerfile` to match your kernel. diff --git a/alpine/kernel/Dockerfile b/alpine/kernel/Dockerfile index 6ad788b41..b925e8bcd 100644 --- a/alpine/kernel/Dockerfile +++ b/alpine/kernel/Dockerfile @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 ARG KERNEL_VERSION=4.9 diff --git a/alpine/kernel/Dockerfile.aufs b/alpine/kernel/Dockerfile.aufs index e6779d01e..8ff318b74 100644 --- a/alpine/kernel/Dockerfile.aufs +++ b/alpine/kernel/Dockerfile.aufs @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 ARG KERNEL_VERSION=4.8.15 diff --git a/alpine/packages/9pmount-vsock/Dockerfile b/alpine/packages/9pmount-vsock/Dockerfile index b8ef1e3c2..0a57f66d3 100644 --- a/alpine/packages/9pmount-vsock/Dockerfile +++ b/alpine/packages/9pmount-vsock/Dockerfile @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 COPY . /9pmount-vsock diff --git a/alpine/packages/nc-vsock/Dockerfile b/alpine/packages/nc-vsock/Dockerfile index 20e8b9901..5e641e334 100644 --- a/alpine/packages/nc-vsock/Dockerfile +++ b/alpine/packages/nc-vsock/Dockerfile @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 COPY . /nc-vsock diff --git a/alpine/packages/tap-vsockd/Dockerfile b/alpine/packages/tap-vsockd/Dockerfile index 8645a3317..2f2d181dd 100644 --- a/alpine/packages/tap-vsockd/Dockerfile +++ b/alpine/packages/tap-vsockd/Dockerfile @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 COPY . /tap-vsockd diff --git a/alpine/packages/transfused/Dockerfile b/alpine/packages/transfused/Dockerfile index 5ecd0c911..ad8604da0 100644 --- a/alpine/packages/transfused/Dockerfile +++ b/alpine/packages/transfused/Dockerfile @@ -1,5 +1,5 @@ -# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 -FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 +# Tag: 3da0b0ea0da2724232603094e67c75b41adab551 +FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090 COPY . /transfused diff --git a/docs/hub.md b/docs/hub.md index fa90be1f8..e2eaf915b 100644 --- a/docs/hub.md +++ b/docs/hub.md @@ -9,12 +9,13 @@ generally with tags based on the image contents. - `mobylinux/alpine-bios` for building BIOS image - `mobylinux/alpine-efi` for building efi images - `mobylinux/alpine-qemu` for Qemu eg for the tests -- `mobylinux/debian-build-kernel` for the kernel builds while we cannot use Alpine + The `Dockerfile`s for these are under `alpine/base`. To update, modify the `Dockerfile` if you wish to change the packages used, and `repositories` if needed, and run `make`. This will push the image -to Docker Hub if it has changed, and update `packages` with a list of the current versions. If the -image has changed, update the other Dockerfiles with this base image to use this new tag. +to Docker Hub if it has changed. + +To update `packages` to use the new version, update their respective `Dockerfile`. Make sure you also update the `# TAG: ` comment at the start of the file. Both the `TAG` and the `sha256` are printed out when pushing the update base to the hub. For example, `alpine/base/alpine-base` is the image used to build the Moby image itself, which is used in `alpine/Dockerfile`. The uploaded tags can be seen at [Docker Hub](https://hub.docker.com/r/mobylinux/alpine-base/tags/).