Dockerfile.dapper 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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
  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.14
  19. ADD https://www.kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-$VERSION.tar.gz .
  20. RUN zcat kexec-tools-$VERSION.tar.gz | tar xvf - \
  21. && cd kexec-tools-$VERSION \
  22. && sed 's/loff_t/off_t/g' -i vmcore-dmesg/vmcore-dmesg.c \
  23. && LDFLAGS=-static ./configure \
  24. && make \
  25. && make install
  26. RUN mkdir -p /source/dist \
  27. && cp -r /usr/local/* /source/dist
  28. ########## Dapper Configuration #####################
  29. ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST APTPROXY
  30. #ENV DAPPER_DOCKER_SOCKET true
  31. ENV DAPPER_SOURCE /source
  32. ENV DAPPER_OUTPUT ./dist
  33. #ENV DAPPER_RUN_ARGS --privileged
  34. #ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
  35. #ENV SHELL /bin/bash
  36. CMD true