forked from rancher/convoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
59 lines (51 loc) · 1.7 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
FROM ubuntu:16.04
# Install packages
RUN apt-get update && \
apt-get install -y \
cmake \
curl \
git \
libglib2.0-dev \
libkmod-dev \
libnl-genl-3-dev \
linux-libc-dev \
pkg-config \
psmisc \
python-tox
# Install Go 1.6
RUN curl -o go.tar.gz https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
RUN echo 'e40c36ae71756198478624ed1bb4ce17597b3c19d243f3f0899bb5740d56212a go.tar.gz' | sha256sum -c && \
tar xzf go.tar.gz -C /usr/local && \
rm go.tar.gz
RUN mkdir -p /go
ENV PATH $PATH:/usr/local/go/bin
ENV GOPATH=/go
# Go tools
RUN go get github.com/rancher/trash
RUN go get github.com/golang/lint/golint
# Docker
RUN curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 > /usr/bin/docker && \
chmod +x /usr/bin/docker
# Install liblvm2
RUN curl -o lvm.tar.gz https://git.fedorahosted.org/cgit/lvm2.git/snapshot/lvm2-2_02_103.tar.gz && \
tar xzf lvm.tar.gz -C /usr/local/ && \
cd /usr/local/lvm2-2_02_103 && \
./configure --enable-static_link && \
make device-mapper && \
make install_device-mapper
# Install convoy-pdata_tools
RUN curl -sL https://github.com/rancher/thin-provisioning-tools/releases/download/convoy-v0.2.1/convoy-pdata_tools > /usr/local/bin/convoy-pdata_tools && \
chmod a+x /usr/local/bin/convoy-pdata_tools
# Setup environment
ENV PATH /go/bin:$PATH
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_RUN_ARGS --privileged
ENV DAPPER_SOURCE /go/src/github.com/rancher/convoy
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
WORKDIR ${DAPPER_SOURCE}
VOLUME /tmp
ENV TMPDIR /tmp
ENTRYPOINT ["./scripts/entry"]
CMD ["build"]