Dockerfile.dapper 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. FROM ubuntu:16.04
  2. # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04
  3. # get the apt-cacher proxy set
  4. ARG APTPROXY=
  5. RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01proxy \
  6. && cat /etc/apt/apt.conf.d/01proxy \
  7. && apt-get update \
  8. && apt-get install -yq build-essential autoconf libtool gawk alien fakeroot \
  9. zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libdevmapper-dev \
  10. module-init-tools \
  11. parted lsscsi ksh curl git wget
  12. WORKDIR /source
  13. #ADD https://github.com/rancher/os-kernel/releases/download/v4.9.15-rancher/build-linux-4.9.15-rancher-x86.tar.gz .
  14. #RUN mkdir -p /usr/src/v4.9.15-rancher \
  15. # && cd /usr/src/v4.9.15-rancher \
  16. # && tar zxvf /source/build-linux-4.9.15-rancher-x86.tar.gz
  17. # https://www.kernel.org/pub/linux/utils/kernel/kexec/
  18. ENV VERSION 2.0.15
  19. RUN wget https://www.kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-$VERSION.tar.gz \
  20. && tar zxvf kexec-tools-$VERSION.tar.gz
  21. RUN zcat kexec-tools-$VERSION.tar.gz | tar xvf - \
  22. && cd kexec-tools-$VERSION \
  23. && sed 's/loff_t/off_t/g' -i vmcore-dmesg/vmcore-dmesg.c \
  24. && LDFLAGS=-static ./configure \
  25. && make \
  26. && make install
  27. RUN mkdir -p /source/dist \
  28. && cp -r /usr/local/* /source/dist
  29. ########## Dapper Configuration #####################
  30. ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST APTPROXY
  31. #ENV DAPPER_DOCKER_SOCKET true
  32. ENV DAPPER_SOURCE /source
  33. ENV DAPPER_OUTPUT ./dist
  34. #ENV DAPPER_RUN_ARGS --privileged
  35. #ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
  36. #ENV SHELL /bin/bash
  37. CMD true