Created
December 24, 2014 16:22
-
-
Save ae6rt/4074df9c41338feb9260 to your computer and use it in GitHub Desktop.
Go Dockerfile with libgit2 support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
MAINTAINER "Mark Petrovic <[email protected]>" | |
# Install packages | |
RUN echo "deb http://elided/ubuntu/xoom /" > /etc/apt/sources.list.d/xoom.list | |
RUN apt-get update && apt-get install -y --force-yes golang=1.3.3 openssl ca-certificates mercurial git openjdk-7-jre gcc build-essential ruby ruby-dev cmake pkg-config libssl-dev | |
# Environment | |
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin | |
ENV GOPATH /go | |
# Cross compilers | |
RUN cd /usr/local/go/src && GOOS=darwin GOARCH=amd64 ./make.bash --no-clean | |
RUN cd /usr/local/go/src && GOOS=windows GOARCH=amd64 ./make.bash --no-clean | |
# Go tools | |
RUN mkdir -p /go | |
RUN go get -v code.google.com/p/go.tools/cmd/cover | |
RUN go get -v github.com/tools/godep | |
# libgit2/git2go C binding | |
RUN go get -d -u -v github.com/libgit2/git2go && cd /go/src/github.com/libgit2/git2go && git submodule update --init && make test install | |
# FPM packaging tool | |
RUN gem install fpm | |
# SSH keys | |
ADD id_dsa /root/.ssh/ | |
ADD id_dsa.pub /root/.ssh/ | |
ADD ssh_config /root/.ssh/config | |
RUN chmod -R go-rwx /root/.ssh | |
# Command line editing | |
RUN echo "set -o vi" > /root/.bashrc | |
# Git config | |
ADD gitconfig /root/.gitconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment