Skip to content

Instantly share code, notes, and snippets.

@thomasleveil
Last active May 25, 2017 15:42
Show Gist options
  • Save thomasleveil/b6cc9f464bd4bc16161e to your computer and use it in GitHub Desktop.
Save thomasleveil/b6cc9f464bd4bc16161e to your computer and use it in GitHub Desktop.
Docker Cloud9 with Golang
FROM kdelfour/cloud9-docker
ENV GO_VERSION 1.6
RUN curl -sL https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz \
| tar xz -C /usr/local/
RUN apt-get update \
&& apt-get install -y bash-completion
ENV GOPATH /workspace
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
.PHONY: build run stop
all: build
build:
docker build -t cloud9-go .
run:
docker rm -f cloud9 ||:
docker run -it -d --name cloud9 -p 80:80 -v $$HOME/workgo/:/workspace/ -v $$SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent cloud9-go
# install glock
docker exec -it cloud9 go get github.com/robfig/glock
# git config
docker exec -it cloud9 sh -c 'curl -sL https://raw.githubusercontent.com/thomasleveil/dotfiles/master/git_config.sh | sh'
# help
@echo go to http://$$(curl -s http://whatismijnip.nl |cut -d " " -f 5)
stop:
docker stop cloud9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment