forked from rancher/os-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
70 lines (54 loc) · 2.25 KB
/
Dockerfile.dapper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:16.04
# FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04
ENV DAPPER_ENV ARCH VERSION DEV_BUILD GITHUB_TOKEN
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_SOURCE /source
ENV DAPPER_OUTPUT ./dist
#ENV DAPPER_RUN_ARGS --privileged
######################
ARG DAPPER_HOST_ARCH=amd64
ARG HOST_ARCH=${DAPPER_HOST_ARCH}
ARG ARCH=${HOST_ARCH}
RUN apt-get update \
&& apt-get install -y build-essential wget libncurses5-dev unzip bc curl python rsync ccache git vim libssl-dev kmod
# Install dapper
RUN curl -sL https://releases.rancher.com/dapper/latest/dapper-$(uname -s)-$(uname -m | sed 's/arm.*/arm/') > /usr/bin/dapper \
&& chmod +x /usr/bin/dapper
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV SHELL /bin/bash
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
########## General Configuration #####################
ARG OS_REPO=rancher
ARG DOCKER_VERSION=1.10.3
ARG DOCKER_PATCH_VERSION=v${DOCKER_VERSION}-ros1
ARG DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}
ARG DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/${DOCKER_PATCH_VERSION}/docker-${DOCKER_VERSION}_arm
ARG DOCKER_URL_arm64=https://github.com/rancher/docker/releases/download/${DOCKER_PATCH_VERSION}/docker-${DOCKER_VERSION}_arm64
######################################################
# Export all ARGS as ENV
ENV DOCKER_URL=DOCKER_URL_${ARCH} \
ARCH=${ARCH} \
DISTRIB_ID=${DISTRIB_ID} \
DOCKER_PATCH_VERSION=${DOCKER_PATCH_VERSION} \
DOCKER_URL=${DOCKER_URL} \
DOCKER_URL_amd64=${DOCKER_URL_amd64} \
DOCKER_URL_arm64=${DOCKER_URL_arm64} \
DOCKER_URL_arm=${DOCKER_URL_arm} \
DOCKER_VERSION=${DOCKER_VERSION} \
HOST_ARCH=${HOST_ARCH} \
OS_REPO=${OS_REPO}
#RUN rm /bin/sh && \
# ln -s /bin/bash /bin/sh
# Install Docker
RUN curl -fL ${DOCKER_URL_amd64} > /usr/bin/docker && \
chmod +x /usr/bin/docker
########## Kernel version Configuration #############################
ENV KERNEL_TAG=4.8.11
ENV KERNEL_VERSION=${KERNEL_TAG}-rancher
ENV KERNEL_SHA1=13d103743a95f6717da9c3fe7e8621c86a4fb7f7
#ENV KERNEL_URL=https://github.com/rancher/linux/archive/v${KERNEL_TAG}.tar.gz
ENV KERNEL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_TAG}.tar.xz