Last active
October 14, 2015 01:15
-
-
Save ailispaw/202618eb6e93a469c5be to your computer and use it in GitHub Desktop.
pottava/docker-webui with docker-alpine on docker-root
This file contains 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
Vagrantfile | |
.vagrant/ |
This file contains 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 gliderlabs/alpine | |
RUN apk --update add curl git mercurial bzr go && \ | |
rm -rf /var/cache/apk/* | |
ENV GOROOT /usr/lib/go | |
ENV GOPATH /gopath | |
ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin | |
RUN go get github.com/fsouza/go-dockerclient && \ | |
go get golang.org/x/net/context | |
RUN go get -d github.com/pottava/docker-webui | |
WORKDIR ${GOPATH}/src/github.com/pottava/docker-webui | |
ENV CONFIG_FILE_PATH config.json | |
EXPOSE 9000 | |
CMD ["go", "run", "main.go"] |
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.box = "ailispaw/docker-root" | |
config.vm.synced_folder ".", "/vagrant" | |
if Vagrant.has_plugin?("vagrant-triggers") then | |
config.trigger.after [:up, :resume] do | |
info "Adjusting datetime after suspend and resume." | |
run_remote "sudo sntp -4sSc pool.ntp.org; date" | |
end | |
end | |
# Adjusting datetime before provisioning. | |
config.vm.provision :shell, run: "always" do |sh| | |
sh.inline = "sntp -4sSc pool.ntp.org; date" | |
end | |
config.vm.provision :docker do |d| | |
d.build_image "/vagrant", args: "-t docker-webui" | |
d.run "ap", | |
image: "docker-webui", | |
args: "-p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock" | |
end | |
config.vm.network :forwarded_port, guest: 9000, host: 9000 | |
end |
Author
ailispaw
commented
Sep 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment