Last active
May 25, 2017 15:42
-
-
Save thomasleveil/b6cc9f464bd4bc16161e to your computer and use it in GitHub Desktop.
Docker Cloud9 with Golang
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 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 |
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
.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