Created
August 26, 2014 17:49
-
-
Save hilem/a1af26e245e08e8100aa to your computer and use it in GitHub Desktop.
playing with docker
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:trusty | |
### Notes: | |
## 1) don't use homebrew for go/docker on OSx, it's outdated and will cause headaches for any other install path | |
## 2) build with | |
## > docker build -t <repos_name> . | |
## 3) run with | |
## > docker run -d -P <repos_name> | |
## 4) view logs with | |
## > docker logs -f <container_nick> | |
# env vars | |
ENV HOME /root | |
ENV GOPATH /root/go | |
ENV PATH /root/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# GOPATH | |
RUN mkdir -p /root/go | |
RUN apt-get update | |
RUN apt-get install -y build-essential mercurial git subversion wget curl | |
# go 1.3.1 tarball | |
RUN wget -qO- http://golang.org/dl/go1.3.1.linux-amd64.tar.gz | tar -C /usr/local -xzf - | |
# get repository | |
RUN go get github.com/rcrowley/go-tigertonic | |
# set env to repository | |
WORKDIR /root/go/src/github.com/rcrowley/go-tigertonic/example | |
ADD . /root/go/src/github.com/rcrowley/go-tigertonic/example | |
RUN go get | |
RUN go build | |
EXPOSE 8000 | |
ENTRYPOINT ./example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment