Go-dexec example
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, go
- Domain
- documentation
Research direction
Start by reviewing the Go example in this issue and the repository's existing example or documentation structure. Confirm where a go-dexec demonstration belongs and what the completed example should show, then verify that the documented Docker usage matches the intended demo.
Written by the indexing model from the issue text.
Description
Example using go-dexec i'll probably demo...
package main
import (
"net/http"
"github.com/fsouza/go-dockerclient"
"log"
"github.com/ahmetalpbalkan/dexec"
"io"
"fmt"
)
func hello(w http.ResponseWriter, r *http.Request) {
cl, _ := docker.NewClient("unix:///var/run/docker.sock")
d := dexec.Docker{cl}
m, _ := dexec.ByCreatingContainer(docker.CreateContainerOptions{
Config: &docker.Config{Image: "busybox"}})
cmd := d.Command(m, "echo", `I am running inside a container!`)
b, err := cmd.Output()
if err != nil { log.Fatal(err) }
log.Printf("%s", b)
io.WriteString(w, fmt.Sprintf("%s", b))
}
func main() {
http.HandleFunc("/", hello)
http.ListenAndServe(":8000", nil)
}
- Dominant language
- No language data
- Stars
- 307
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bfirsh/serverless-docker
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
bfirsh/serverless-docker#5 · 4 comments ·
-
Getting involved? Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
bfirsh/serverless-docker#4 · 2 comments ·
All issues in bfirsh/serverless-docker
Similar issues
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GDQuest/learn-gdscript#1395 ·
-
rules
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
HttpClient
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
symfony/symfony-docs#23092 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
huggingface/sentence-transformers#4074 ·