https://github.com/twogg-git/go-online
Some Go examples to run directly in labs.play-with-docker.com
https://github.com/twogg-git/go-online
docker golang
Last synced: about 2 months ago
JSON representation
Some Go examples to run directly in labs.play-with-docker.com
- Host: GitHub
- URL: https://github.com/twogg-git/go-online
- Owner: twogg-git
- Created: 2017-07-04T22:55:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T12:36:39.000Z (about 9 years ago)
- Last Synced: 2025-09-04T09:31:06.444Z (11 months ago)
- Topics: docker, golang
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-online
This go examples are ment to run on labs.play-with-docker.com
First start a session in http://labs.play-with-docker.com/, then "ADD NEW INSTANCE".
### To run directly each example just use the following commands:
Runing hello world
```sh
docker run --rm golang sh -c \ "go get github.com/twogg-git/go-online/hello/... && exec hello"
```
OutYet file: This is a more complex example, include rest services and an exposed port, in this case 8080.
```sh
docker run -p "8080:8080" --rm golang sh -c \ "go get github.com/twogg-git/go-online/outyet/... && exec outyet"
```
### Runing just hello world example:
#### 1. Dowload build and install hello world file
```sh
docker run golang go get -v github.com/twogg-git/go-online/hello/...
```
#### 2. Built the container into a new image
```sh
docker commit $(docker ps -lq) testgo
```
#### 3. Run the image
```sh
docker run testgo hello
```
Based on: https://blog.docker.com/2016/09/docker-golang/