forked from rancher/os-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
64 lines (50 loc) · 1.9 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
FROM ubuntu:bionic
# FROM arm64=arm64v8/ubuntu:bionic
RUN apt-get update && \
apt-get install -y curl git wget unzip
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=benok
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
ARG IMAGE_BUILD_NAME=[1-9]*
######################################################
# 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}
# Meaningful ENV
ENV IMAGE_BUILD_NAME=${IMAGE_BUILD_NAME}
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
# sidestep https://github.com/rancher/dapper/issues/92 with v0.5.4
ARG DAPPER_VERSION="v0.5.4"
RUN curl -sL https://github.com/rancher/dapper/releases/download/${DAPPER_VERSION}/dapper-$(uname -s)-$(uname -m) > /usr/bin/dapper && \
chmod +x /usr/bin/dapper
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]