forked from portworx/lcfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build
42 lines (34 loc) · 1.38 KB
/
Dockerfile.build
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
# vim:set ft=dockerfile ts=4:
# lcfs build Docker file [201701.06MeV]
# NOTE: this dockerfile does NOT create a runnable container
# it builds the lcfs and docker plugin binaries which will be copied out
# and run in it's own container with a private version of docker
FROM golang
MAINTAINER Michael Vilain <[email protected]>
ARG VERSION
ENV VERSION ${VERSION}
ARG REVISION
ENV REVISION ${REVISION}
ARG BUILD_FLAGS
ENV BUILD_FLAGS ${BUILD_FLAGS}
# tools to build libfuse for lcfs
RUN apt-get update && \
apt-get install -y build-essential util-linux libcurl4-openssl-dev \
libxml2-dev mime-support libgoogle-perftools-dev liblzma-dev rpm file alien sudo libz-dev
#ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ADD . /go/src/github.com/portworx/lcfs
WORKDIR /go/src/github.com/portworx/lcfs
RUN wget -q https://github.com/libfuse/libfuse/releases/download/fuse-2.9.7/fuse-2.9.7.tar.gz
RUN tar -xzf fuse-2.9.7.tar.gz
WORKDIR fuse-2.9.7
RUN ./configure && make -j8 && make install
WORKDIR /go/src/github.com/portworx/lcfs/lcfs
RUN make clean
RUN make STATIC=y BUILD_FLAGS="${BUILD_FLAGS}" VERSION="${VERSION}" REVISION="${REVISION}" rpm
RUN mkdir /tmp/pkgs
RUN \cp -a rpm/lcfs/RPMS/x86_64/*.deb /tmp/pkgs
RUN \cp -a rpm/lcfs/RPMS/x86_64/*.rpm /tmp/pkgs
RUN \cp -a rpm/lcfs/RPMS/x86_64/*.tgz /tmp/pkgs
WORKDIR /go/src/github.com/portworx/lcfs/plugin
RUN make
RUN mv lcfs_plugin /tmp/lcfs_plugin.bin