forked from rancher/cattle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dapper
61 lines (51 loc) · 1.71 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
FROM ubuntu:14.04.3
ENV DAPPER_ENV API_VERSION ENVIRONMENTS
ENV DAPPER_RUN_ARGS --privileged
ENV DAPPER_SOURCE /usr/src/cattle
ENV DAPPER_OUTPUT dist
WORKDIR ${DAPPER_SOURCE}
# MySQL
ENV MYSQL_VERSION 5.5
ENV MYSQL_HOST 127.0.0.1
ENV MYSQL_TCP_PORT 13306
# Postgres
ENV PGSQL_VERSION 9.6
ENV PGHOST 127.0.0.1
ENV PGPASSWORD cattle
ENV PGUSER cattle
ENV PGDATABASE cattle
# Install Java and Python
RUN apt-get update && \
apt-get install -y --no-install-recommends openjdk-7-jdk maven python-pip && \
# Hack to work around overlay issue && \
pip uninstall -y py >/dev/null >/dev/null 2>&1 || true && \
pip install --upgrade pip==6.0.3 tox==1.8.1 virtualenv==12.0.4
# Build Tools
ENV BUILD_TOOLS_VERSION 0.3.1
RUN apt-get install -y curl
RUN mkdir /tmp/build-tools && \
cd /tmp/build-tools && \
curl -sSL -o build-tools.tar.gz https://github.com/rancherio/build-tools/archive/v${BUILD_TOOLS_VERSION}.tar.gz && \
tar -xzvf build-tools.tar.gz && cp ./build-tools-${BUILD_TOOLS_VERSION}/bin/* /usr/local/bin && \
rm -rf /tmp/build-tools
# Cache Maven stuff
RUN apt-get install -y git && \
cd /tmp && \
git clone https://github.com/rancher/cattle.git && \
cd cattle && \
git checkout v0.160.0 && \
mvn package && \
./scripts/checkstyle && \
cd .. && \
rm -rf cattle
# Install Docker
RUN apt-get install -y iptables && \
curl -o /usr/bin/docker -sL -f https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 && \
chmod +x /usr/bin/docker
# Cache binaries
RUN apt-get install -y xz-utils
COPY ./resources/content/cattle-global.properties ${DAPPER_SOURCE}/resources/content/
RUN bash -x cattle-binary-pull
VOLUME /var/lib/docker
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]