forked from rancher/os-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
76 lines (63 loc) · 3.02 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
70
71
72
73
74
75
76
FROM ubuntu:16.04
# FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04
RUN apt-get update && \
apt-get install -y curl git
ENV DAPPER_ENV VERSION DEV_BUILD
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_SOURCE /go/src/github.com/rancher/os-images
ENV DAPPER_OUTPUT ./dist
ENV DAPPER_RUN_ARGS --privileged
ENV SHELL /bin/bash
WORKDIR ${DAPPER_SOURCE}
########## General Configuration #####################
ARG DAPPER_HOST_ARCH=amd64
ARG HOST_ARCH=${DAPPER_HOST_ARCH}
ARG ARCH=${HOST_ARCH}
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
######################################################
# Set up environment
ENV DOCKER_URL DOCKER_URL_${ARCH}
# Export all ARGS as ENV
ENV ARCH=${ARCH}
ENV DISTRIB_ID=${DISTRIB_ID}
ENV DOCKER_PATCH_VERSION=${DOCKER_PATCH_VERSION}
ENV DOCKER_URL=${DOCKER_URL}
ENV DOCKER_URL_amd64=${DOCKER_URL_amd64}
ENV DOCKER_URL_arm64=${DOCKER_URL_arm64}
ENV DOCKER_URL_arm=${DOCKER_URL_arm}
ENV DOCKER_VERSION=${DOCKER_VERSION}
ENV HOST_ARCH=${HOST_ARCH}
ENV OS_REPO=${OS_REPO}
RUN rm /bin/sh && \
ln -s /bin/bash /bin/sh
# Install Docker
RUN curl -fL ${!DOCKER_URL} > /usr/bin/docker && \
chmod +x /usr/bin/docker
# 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
# Download Docker engines
RUN mkdir -p /assets/docker-1.10.3 && \
curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 > /assets/docker-1.10.3/docker && \
chmod +x /assets/docker-1.10.3/docker
RUN mkdir -p /assets/docker-1.10.3_arm && \
curl -sL https://github.com/rancher/docker/releases/download/v1.10.3-arm/docker-1.10.3_arm > /assets/docker-1.10.3_arm/docker && \
chmod +x /assets/docker-1.10.3_arm/docker
RUN mkdir -p /assets/docker-1.10.3_arm64 && \
curl -sL https://github.com/rancher/docker/releases/download/v1.10.3-arm64/docker-1.10.3_arm64 > /assets/docker-1.10.3_arm64/docker && \
chmod +x /assets/docker-1.10.3_arm/docker
RUN curl -sfL https://get.docker.com/builds/Linux/x86_64/docker-1.11.2.tgz | tar xzf - -C /assets && \
mv /assets/docker /assets/docker-1.11.2
RUN curl -sfL https://github.com/rancher/docker/releases/download/v1.11.2-ros1/docker-1.11.2_arm.tgz | tar xzf - -C /assets && \
mv /assets/docker /assets/docker-1.11.2_arm
RUN curl -sfL https://github.com/rancher/docker/releases/download/v1.11.2-ros1/docker-1.11.2_arm64.tgz | tar xzf - -C /assets && \
mv /assets/docker /assets/docker-1.11.2_arm64
RUN curl -sfL https://get.docker.com/builds/Linux/x86_64/docker-1.12.1.tgz | tar xzf - -C /assets && \
mv /assets/docker /assets/docker-1.12.1
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]