github.com/searchspring/haus@v0.1.8-0.20200414161854-a7ca8bb9ea93/contrib/packaging/haus-docker/deb/Dockerfile (about)

     1  FROM buildpack-deps:jessie-scm
     2  
     3  ENV GO_VER go1.4.2.linux-amd64
     4  ENV HAUS_VER 0.1.7
     5  ENV GOPATH /app/go
     6  ENV GOROOT /usr/local/go
     7  ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin
     8  
     9  # Download go
    10  RUN \
    11  	cd /tmp && \
    12  	wget https://storage.googleapis.com/golang/${GO_VER}.tar.gz
    13  
    14  # install go
    15  RUN \
    16  	mkdir -p $GOROOT && \
    17  	mkdir -p $GOPATH/bin && \
    18  	mkdir -p $GOPATH/src && \
    19  	cd /usr/local && \
    20  	tar zxvf /tmp/${GO_VER}.tar.gz && \
    21  	rm /tmp/${GO_VER}.tar.gz
    22  
    23  # Install build tools
    24  RUN \
    25  	apt-get update && \
    26  	apt-get -y install \
    27  		make \
    28  		cmake \
    29  		pkg-config \
    30  		libssh2-1-dev \
    31  		libssh2-1 \
    32  		libssl-dev \
    33  		openssh-client \
    34  		openssh-server \
    35  		zlibc \
    36  		git \
    37  		libcurl4-openssl-dev
    38  
    39  
    40  # Install git2go and libgit2
    41  RUN 	go get -d gopkg.in/libgit2/git2go.v22 && \
    42  	cd $GOPATH/src/gopkg.in/libgit2/git2go.v22 && \
    43  	git checkout next && \
    44  	git submodule update --init && \
    45  	./script/build-libgit2-static.sh && \ 
    46  	cd vendor/libgit2/build/ && \
    47  	make && \
    48  	make install && \
    49  	cd ../../../ && \
    50  	make test && \
    51  	make install
    52  
    53  ENV PKG_CONFIG_PATH=$GOPATH/src/gopkg.in/libgit2/git2go/vendor/libgit2/build/ 
    54  
    55  # Install yaml,RepoTsar, and haus
    56  RUN \
    57  	go get gopkg.in/yaml.v2 && \ 
    58  	go get github.com/searchspring/repo-tsar && \
    59  	go get github.com/searchspring/haus 
    60  
    61  # Build Package
    62  RUN \
    63  	mkdir -p /app/deb && \
    64  	cd /app/deb/ && \
    65  	mkdir -p haus_${HAUS_VER}/usr/local/bin && \
    66  	cp $GOPATH/bin/haus haus_${HAUS_VER}/usr/local/bin/ && \
    67  	mkdir -p haus_${HAUS_VER}/DEBIAN
    68  
    69  COPY control /app/deb/haus_${HAUS_VER}/DEBIAN/
    70  
    71  RUN \
    72  	cd /app/deb && \
    73  	dpkg-deb --build haus_${HAUS_VER}
    74  
    75  COPY .hauscfg.yml /root/